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.

Self-Refering Calculated Relationship

Featured Replies

I have a table with a list of cached incoming contacts, all in various user accounts.

I want to make a relationship that refers the table to itself to get a portal list of contacts without assigned unique FM ID's like so:

6835690335_f449dcbfbd_b.jpg

Of course, this isn't possible, but it would be nice.

Yes, this could be done using a find, but I'm trying to save some steps if possible. From there, I'd add a calculated foundcount() field based on the related records to decide which options to show or hide.

Ideas?

Could you rephrase your question? Perhaps focus more on what you want to achieve, and less on why it's not possible?

  • Author

Could you rephrase your question? Perhaps focus more on what you want to achieve, and less on why it's not possible?

comment - Thank you for your reply. You're right. The question is about a relationship, but the end goal is presentation layer information based on a calculation and a relationship.

While in the layout for table 'Outlook Contacts Cache', I want a calculation field to give me a record count of the contacts that exist without an ID. The expression 'Count ()' will not accept an expression in place of a field thus: 'Count ( IsEmpty( Outlook Contacts Cache::ID) )'. If I had a self-referring relationship that could include calculations, like the above, I could use 'Count (OL New Contacts::ID)' in the calc field. I could script this into a global field, but I can better base button availability and conditional formatting on a calc field. If there are new contacts, I can 'light up' the 'View New' button so that users can easily see there are new contacts to import into filemaker from the table 'Outlook Contacts Cache'.

I want a calculation field to give me a record count of the contacts that exist without an ID.

Assuming you want to count among all records in the table, not just the current found set: define a self-join relationship using the x relational operator. You can use any field/s as matchfields, e.g.:

Outlook Contacts Cache::ID x Outlook Contacts Cache 2::ID

With this in place, a calculation field (result is Number) =

 Get ( TotalRecordCount ) - Count ( Outlook Contacts Cache 2::ID )

should return the required number.

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.