July 28, 201411 yr Newbies 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
July 28, 201411 yr 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 …
July 28, 201411 yr Author Newbies 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.
Create an account or sign in to comment