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.

Lookup Related Values with Multi Key

Featured Replies

Hello All,

I am looking to add a field which concatenates the "related" values of a multi key.

I have 2 tables Appointments and Users.

(Appointments)

ID

Start

End

User ID

Function ID

Description

ShowUsers - Calc field I want to create

(Users)

ID

Name

Initials

The User ID field in the Appointment table is a check box set so multiple users can be added to an appointment.

All is splended except in one of my Layouts I want to show the user initials in one line (ie. RC,LP,DT). The problem is that I am storing the User ID for a lookup so I have this to deal with

1

3

6

I need to look up the related value of each line and concatenate them. What is the function that lets me look up a value in a related table based on another field value.

My magic function

getrelatedvalue(RelatedField,LookupField,LookupValue)

getrelatedvalue(User::Initials;User::ID;getvalue(Appointments::User ID;1))

Does someone know of this custom function?

Is there another way?

Thanks for any help

You really should have a join table btw Appts and Users rather than a multikey. On the Appt form layout, you would have a portal to the join table.

  • Author

The portal would be to cumbersom for the layout, I would still want to concatenate the values into one field. Imagine whatever calendar program you use going from Daily view to Weekly to Monthly the realistate gets real tight. I still want the users to see all people assigned to a specific appointment in one line rather than scroll a portal.

Realisticaly the percentage of appointments with more than one user will be small less than 5% probably.

Edited by Guest
Added Percent comment.

Try:

Substitute ( List ( User::Initials ) ; ¶ ; "," )

  • Author

Thats outstanding Comment thanks, its perfect and just in time because I get to leave for home now.

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.