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.

Drop-down list based on IDs and showing the corresponding name

Featured Replies

  • Newbies

Level: Beginner

OS: Win 7 X64 (not listed in profile options)

Hi everyone. This is my first post and I'm rather new to FM so I apologize in advance if my question is very basic.

I'm trying to create a drop-down list with a value list based on IDs and always showing the corresponding name (not the ID).

However the ID must be finally stored in the table.

To do so, I created a value list with the first field referencing to the ID and the second field referencing to the corresponding name, showing values only from the second field.

Back to browse mode, clicking in the field shows indeed the list of names (OK) but once one name is chosen it then shows the ID in the field (not OK). The ID is stored in the table (OK).

Trying to find a solution by changing only the control style from drop-down list to pop-up menu, back in browse mode the name (and not the ID) is always displayed (OK) but the name is now stored in the database instead of the ID (not OK) !

My questions:

  • 1) Is there any reason for such a different behaviour between drop-down list and pop-up menu ?
  • 2) How to always display names and store IDs in the table ?

Edited by Guest

Great first post, Casey. Very detailed and clear.

Well, as you've discovered drop down lists show the value entered in the field (the ID in a value list that consists of two fields).

Popup menus show the second field, but store the first (the ID).

It is not consistent from your description that the change from dropdown list to popup menu would NOT store the ID. Something else must have changed.

When a popup menu gets too long to be appropriate, I use a popup window of choices. Here's a demo.

PS: Some people layer two fields when using a drop down list. The top field is not enterable in browse and is the related text field. The bottom field is enterable, and is formatted for the drop down list. Make this field narrow.

PopupSelectDemo2.zip

Edited by Guest

  • Author
  • Newbies

Many thanks for the quick answer and for the demo.

I think that your demo will solve my problem.

I just need a bit more time to fully understand the demo and to adapt it to my needs.

I will post later a follow-up.

Finally, for completeness I've attached a minimalistic example that reproduces the problem I have encounted with the change from dropdown list to popup menu.

EDIT: following your suggestion of adding a related field, I have found one way round the problem: creating a TO and linking the ManagerID field with the ID field of the TO and adding the related field showing the name. However this is not optimal because it creates yet another TO.

TEST_ValueList.zip

Edited by Guest

  • 4 weeks later...
  • Author
  • Newbies

Ok, now I think I understand.

When using a pop-up menu the ID is always stored even if the Table View shows the corresponding name instead.

Indeed, having a pop-up menu means that there's a value list that may show the terminal name instead of the ID.

This can be checked by populating a field using a pop-up menu, then changing this field to an edit box and going in the Table View: the IDs are now shown instead of the terminal names that were previously coming from the Value List of the pop-up menu.

Thanks for your help!

Edited by Guest

The purpose of a drop down menu is to restrict entries to only certain values. The design purpose of a drop down list object is to allow entry of alternate values. Therefore the actual values of the list item must be visible.

Hiya Bruce.

I'm not sure if I entirely agree with this statement.

Why would one be putting a value directly in a related table anyway via this method regardless of dropdown or popup? For a custom list, we have the optional Edit.

Finally, one could just paste into popup field anyway...

I think it was something missed by FMI. I wish that FileMaker would allow the second field to be displayed like the popup menu. But thats just MHO. :

Well, that's the way it works. What you want is reasonable but it isn't what we were given.

Sometimes we want drop down lists to be restricted or to display a related value - but that is not what Filemaker designed.

A drop down list === a field with user editable content. Therefore that content must be directly visible, as entered.

  • 1 year later...
  • Newbies

I downloaded your demo but Windows didn't recognize the file type. What kind of demo is it?

Datasmith

I downloaded your demo but Windows didn't recognize the file type. What kind of demo is it?

Datasmith

It is a compressed zip file. This means that the file is an archive of one or more other files compressed into one file (a zip file).

You can use programs like:

Winrar: http://www.win-rar.com/download.html

Winzip: http://www.winzip.com/downwz.htm

7zip: http://www.7-zip.org/download.html

to open, extract or view them. (The programs kind of look like a second windows explorer but then for compressed files)

I preferr winrar, I don't know about you. Just test them out :P

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.