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.

Calc field - Counting related records?

Featured Replies

I have an 'Alert' Calc field that I'm displaying on a layout to display information about the record that is not completed. I'd also like to display if there are no related records of X relationship.

For instance, if there are no related records via the 'Safety Assessment' relationship, I'll want to display "Missing Safety Assessment" in the field.

I just don't know which function I could use to test that.

Any help appreciated, thank you! smile.gif

assuming ID is a field that's in the Safety Assesment table and it always has a value:

if(count(Safety Assessment::ID) = 0,"Missing Safety Assessment","")

or

if(not isvalid(Safety Assessment::ID),"Missing Safety Assessment","")

Jeff

  • Author

Thank you, I did not think of that.... did exactly what I wanted to! smile.gif

The best function for this purpose is isEmpty. It has been optimized for this purpose and will give much better performance than the count function. FMI reps have repeatedly made it clear that using isValid as suggested here is not relible.

if( isEmpty(Safety Assessment::ID),"Missing Safety Assessment","")

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.