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.

No related record function?

Featured Replies

Is there a way i can put in a script step to check if a related record exists?

Reply would be great

cheers, genx

You can use IsValid(RelatedTable::relatedSerialField) inside an If[] script step.

  • Author

worked, cheers mate

Note that IsValid could return false even if there is a related record (see FM Help). IsEmpty is more reliable and, from what I have read, optimized for this use.

I have been using Count(TO::Field) with consistent results, is there any reason I should be using IsEmpty instead?

If there are lots of related records, Count() will be slower, as it actually has to count them all.

you could also use if(sum(any related numeric field)=0). Use this successfully in scripts as long as there is always going to be a number in the numeric fields, e.g. account number.

You could also set up a calculation field in your table that returns a 1 if there is a count or sum greater than zero in related tables and use this as a flag in scripts.

You could also go to related records and check file, layout or table names to check if its gone to any.

if(sum(any related numeric field)=0)

You havn't understood what Ender wrote, littering the calc with yet another function ...is making things worse, all aggregate functions suffer from this artifact. But we're way beyond 4000 records in the related, before any noticable difference shows.

--sd

If the related field is a number field that is guaranteed not to contain zero (e.g. a serial number), you can make it simply:

If [ related::serialID ]

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.