Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4695 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm trying to create a list of years based on a date field in one of my tables.

I am putting a dashboard together that allows the user to select the starting year from a drop down list. Each user will possibly have a different range of dates in their copy so i would like to have a drop down list of years based on the dates in a field in their copy.

I hope that makes some sense and someone can point me in the right direction?

Thanks

Posted

A calculation field (unstored, text)

YearList = Year(Get(currentDate))-2 & "¶" & Year(Get(currentDate))-1 & "¶" & Year(Get(currentDate)) & "¶" &Year(Get(currentDate))+1 & "¶" &Year(Get(currentDate)+2

will give you a list of years from 2 years ago to 2 years hence. Adjust the range as needed.

Then create a value list using values from YearList.

Posted

i would like to have a drop down list of years based on the dates in a field

Define a calculation field (result is Number) =

Year ( Datefield )

and a value list based on this field.

A calculation field (unstored,

...

Then create a value list using values from YearList.

Have you tried this?

Posted

Apologies. My original calculation that has been in use for years set a field YearListSeed in a startup script, and built the calculation from that. One of these days I'll stop shooting from the hip.

This topic is 4695 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.