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.

Question how to test each related record

Featured Replies

Greetings. I have two linked databases, one of persons and another of their titles, linked on an ID field; it's a one-to-many relationship. I need to be able to calculate whether each selected person has a variety of titles, which means checking through each element of the set of related records and setting a flag for that person.

Years ago I did this in Algol with this sort of pseudo-code:

For each person

For each related record

If the title is one of the ones needed, set a flag in the person DBF

End loop of related records

End loop of persons

What I can't figure out is how I make the if test on just the records related to the person.

I am probably approaching it from the wrong way in FMP...

I hope this is clear. Thanks!

Reading through your post, it seems you are trying to find people of a certain title or titles.

You could just find in the titles table and go to related records match found set. That'll give you all the people with that title.

There are other techniques, but is not clear exactly what you are trying to do.

If the title is one of the ones needed, set a flag in the person

This could be calculated from the people table, e.g.:D

not IsEmpty ( FilterValues ( "King¶Queen¶Prince¶Princess" ; List ( Titles::Title ) ) )

will return true if the person is a royalty.

  • Author

Thank you both for your answers. I think I have it figured out.

"List" is what I was looking for--I'd missed that function completely, but it seems to do what I wanted, by allowing me to process the related records as one string.

I'm trying to produce a complex presence-absence chart of persons vs certain titles, and I believe I have the key now.

Thank you again!

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.