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.

get value list second field value?

Featured Replies

  • Newbies

i have created a drop-down list with the first field hidden and the second shown. the hidden field is a key. id and label. (using it like an array)

the drop-down is for a field of a child table of that sits on the parent layout in a portal. the drop-down value list is not related to the parent or child record.

in a script I need to get the second field based on the first field.

i looked at getnthrecord, but I need to get by key not record number.

anyone have any ideas? thanks

This is not entirely clear. Are you selecting a specific child for a parent? If so, the easiest way to get data from the selected child would be to establish a second relationship to the child table, matching the selected key.

You COULD use GetNthRecord() instead, provided that:

(a) your existing relationship is sorted by the second field of your value list; and

(: your value list is filtered by the relationship; and

© the second field contains only unique values.

Under these conditions, the index position of the selected key in ValueListItems() will be also the N required for the GetNthRecord() function. Otherwise you'll need to grab the selected key and do a find for it in the child table.

  • Author
  • Newbies

thanks for the response.

here is some more info.

parent: contacts

child: phone numbers (has the label field)

value list: label (id, name) not related to either parent or child.

value list comes from a shared table with many lists not just the phone list, makes it easier for entering lists.

Sorry, I don't quite follow what you wrote. You speak of a phone numbers table, but then there is "a shared table with many lists". It's not clear if they are the same, and I am not at all sure what you mean by "many lists".

In any case, I think I have already answered the question - there is no way to get the "second field" value directly from the drop-down field. You must have a list of the "label" values that corresponds exactly to the list of "id" values, as produced by your value list.

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.