Paul Webb Posted January 14, 2012 Posted January 14, 2012 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
doughemi Posted January 15, 2012 Posted January 15, 2012 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.
comment Posted January 15, 2012 Posted January 15, 2012 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?
doughemi Posted January 16, 2012 Posted January 16, 2012 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now