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 id from valuelist

Featured Replies

Good day dear FM friends, I have hot stuck on something much trivial - something I though would be a breeze to set up, but apparently not. Please help, dear friends!

I thought I could easily find a function similar to GetValue but the other way around. With a valuelist based on cities::id to show cities::name I would need to do something like:

getValueListItem("cities value list"; "Paris") to return cities::id.

I understand I can use position to find the position in the list, but how about the corresponding id?

Not sure I understand your question. Perhaps you mean something like this?

http://www.briandunning.com/cf/908

  • Author

Found it! Thanks for your fast reply though.

GetNthRecord ( cities::id ; Position(List(cities::name) ; "Paris" ;0 ;1 ))

GetNthRecord ( cities::id ; Position(List(cities::name) ; "Paris" ;0 ;1 ))

That doesn't look right: if your Cities table contains Amsterdam, Paris and Stockholm (in that order), then =

Position(List(cities::name)  ; "Paris" ;0 ;1 )

will return 11 instead of the 2 you need.

  • Author

I see.... hm. Thought I had id! Kudos to your hawk eyes. Any idea on how to do this? basically an automation of what happends when I manually select a entry in a valuelist that is set to only show the second column.

The CF I linked to earlier will do it. Using the earlier example =

CorrespondingValue ( List ( Cities::Name ) ; "Paris" ; List ( Cities::ID ) )

will return the ID of Paris.

The function is not recursive, so you could also use its formula directly in your calculation field.

  • Author

Thanks! Will look into that. For now I came up with:

getnthrecord( cities::id ; PatternCount(Left( List( cities::name) ; Position( List( cities::name ) ; "Paris" ;0 ;1 )); ¶) +1)

That's very similar to what the function does - except it includes protection against values being contained in other values.

  • Author

Yes, that could be usefull! Thanks for input!!

Position( ¶ & List( cities::name ) & ¶ ; ¶ & "Paris" & ¶ ;0 ;1 )

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.