Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dynamic Value List - Date Calculation

Featured Replies

I would like to create a pop-up value list which is simply about a half dozen years to choose from, starting with next year, but changing each year depending on the date. For example, this year, the user enters the field and they can choose from 2003, 2002, 2001, 2000, 1999, 1998... but next year, the same field would supply six sequential year choices starting with 2004 and ending with 1999. Anyone know how I can do this in a value list? I assume I must select use values from a field, then create a calculation field and use Year(Today) but then what? Year(today) + 1 etc. etc. doesn't seem to work. I don't know how to make a calculation field return multiple values either.

Thanks in advance for anyone's suggestions.

Chris. (BTW - Duncan is the name of my Golden Retriever)

quote:

Originally posted by Duncan:

I would like to create a pop-up value list which is simply about a half dozen years to choose from, starting with next year, but changing each year depending on the date. For example, this year, the user enters the field and they can choose from 2003, 2002, 2001, 2000, 1999, 1998... but next year, the same field would supply six sequential year choices starting with 2004 and ending with 1999. Anyone know how I can do this in a value list? I assume I must select use values from a field, then create a calculation field and use Year(Today) but then what? Year(today) + 1 etc. etc. doesn't seem to work. I don't know how to make a calculation field return multiple values either.

Thanks in advance for anyone's suggestions.

Chris. (BTW - Duncan is the name of my Golden Retriever)

Create an file Years.fp5 with as many records you wish to display in pop-up list with calc field years defined in this way:

code:


years=Year(Status(CurrentDate))+Status(CurrentRecordCount)-Status(CurrentRecordNumber)

and make result calculation as number.

Than in your main file create list "year" as using values from field "years" from file years.fp5

Well this won't reverse the display order since FM apply default ascending order when indexing an field ( you can change the set of characters to use for indexing but not the order).

So if you really really need the display in reversed order, than consider using portal (because you can define sort order) instead of pop-up list

HTH

Dj

[ April 07, 2002, 11:54 PM: Message edited by: dj ]

  • Author

Thanks so much! You really know this program.

Chris

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.