Newbies jfaunce2 Posted July 28, 2014 Newbies Posted July 28, 2014 I need to create a value list for a drop down to be able to choose the Graduation Year for students. I'd like the list to include: this year, this year +1, this year + 2, and so forth. I don't want to do fixed values since list will advance each year. Thank you
Rick Whitelaw Posted July 28, 2014 Posted July 28, 2014 Year(GetCurrentDate) I believe . . . +1, +2 etcetera.
eos Posted July 28, 2014 Posted July 28, 2014 You can write a script that is executed OnFirstWindowOpen (or is called by another, generic start script) and compares the values of a stored field in a one-record Control table with the contents it should have based on the current date, and updates its contents if they differ. Go to Layout [ Control ( Control ) ] Set Variable [ $yearList ; Let ( y = Year ( Get ( CurrentDate ) ) ; List ( y ; y + 1 ; y + 2 /* andSoForth */ ) ) ] If [ Control::yearList ≠ $yearList ] Set Field [ Control::yearList ; $yearList ] End If Base your value list on that field. OTOH … I don't want to do fixed values since list will advance each year. … that's once (1x) a year. Posting this message, reading the replies and implementing this or any other suggested method will probably eat up any savings in time you could ever hope to gain by automating this process. But then of course, we're programmers … Year(GetCurrentDate) I believe . . . +1, +2 etcetera. The problem I see: if you index that, it won't update; if you don't index it … 1
Newbies jfaunce2 Posted July 28, 2014 Author Newbies Posted July 28, 2014 Thanks. I agree that manually updating is quick (and I've spent too much time on this already), but I'm 72 and may not work forever at school. Will someone else update? Who knows. Yes, indexing is the problem. I created a list value, but FM whined that it wouldn't index.
Recommended Posts
This topic is 4038 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