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.

Numerical Value based on choice in a pull down menu

Featured Replies

Hi,

I'm just starting with FMPro5, or any databases for that matter.

I am trying to make a DB that has a set of fields with a pull down menu that has choices of foods.

I also have a field that I would like to display certain numbers depending upon the choice in the pull down menu field.

I'm not sure how you would do this.

I figured out that if I make the second field a 'calculation' field, I can use an if statement something to the effect of, "if the food field is (lets say) eggs, then display (lets say) 3, if not, then display 0" My problem is, I have a long list of choices under the pull down menu of foods, and I want a variety of numbers to display, depending upon the choice.

Is that even remotely clear?

Thanks in advance if you are able to help.

Paul

If you have a long list of items, you're probably better off using a related file (Foods.fp5) to store the values. An added bonus is that you can base your value list on the field in this related file. And, updates to the related file will automatically be reflected in your value list. The related file would have two fields, FoodName and Number. Create a record for each Food/Number combination. You would base your value list in the main file on the FoodName field in the related file. The displayed number would then just be the related Foods::Number field.

[ November 13, 2001: Message edited by: BobWeaver ]

That is one way and you can use CASE, which will be shorter, those IFs.

Or you can write the number directly with text in valuelist and then just extract the number.

And even better will be to create the value list "on the fly" from field or even from another database.

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.