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.

limiting number of value list entries

Featured Replies

Hey all,

I need to create a value list to allow users in an invoicing database to select which show (from a shows file) the invoice is coming from.

I created a value list based on all the existing shows, but I want to make sure that this value list doesn't grow indefinitely. (I don't want users to have 300 options to choose from in a few years).

I would be glad to either limit the number of entries to, say, 10 shows, or to only show shows that occurred withing the past 6 months.

The only ways that I can imagine doing this are rather complex, I was wondering if anyone had any simpler suggestions.

Thanks.

-wald

Create a calc that results in only the last 10 shows being displayed. Then use this calc as the basis of a relationship to the shows file. Then base your valuelist on that relationship.

This requires FMP 5.x and higher.

How to do the calculation to get only the last 10 shows however...?

Another option would be to sort the value list by show number or show date so that the most recent shows are immediately displayed, but the other are still available, and this requires little effort on your part.

How you determine which shows you wish to display is up to you. Once you do, you can have a number field in the Shows file:

Active (number, indexed)

Create a field in the Invoices file:

Constant (calculation, number, indexed) = 1

Create a relationship in the Invoices file with Constant <---> Active

Create a value list in Invoices based upon this relationship. You can run a periodic script in the Shows file to make shows inactive based upon some criteria.

-bd

  • Author

You guys are very helpful

You saved me a bunch of time.

Thank you

-wald

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.