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.

Accessing related values for a calculation

Featured Replies

Does anyone know a way to access related fields in a calculation so values (other than the first matching value) can be retrieved? In a repeating field this can be done with the GetRepetition function. I'd like to be able to, for example, access the 7th related record meeting the relationship criteria without having to create a portal and a script to loop through the portal rows.

I realize this is not a built in feature of filemaker but I'm wondering if there are any new tricks in FM7 or plugins which might enable this.

Thanks...

This sounds like a job for the Choose function.

  • Author

How so? I don't understand how to make that work in this case.

Perhaps I didn't explain clearly what I'm trying to do. Imagine that you have a table called "Teachers" where each record represents a different teacher. Within a layout is a portal which shows the names of Students assigned to a given teacher from a related table .

How can I create a calculation of type text which returns: "Teacher Jones, your students names are Alice, Bob, Charles, ..etc." Or a second calculation which retruns Student #2 = Bob.

Thanks.

Create a value list in the Teachers file based on the related field you want to list. If there's a chance there may be duplicate names, add the related serial as the second field in the value list definition and sort by it. Then create an unstored calculation text field of Substitute( ValueListItems( Get(FileName); "yourvaluelist" ); "

  • Author

Eureka! That is brilliant.

Merci.

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.