Jump to content

Calc field - Counting related records?


This topic is 7309 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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","")

Link to comment
Share on other sites

This topic is 7309 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.