Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Best way to check if there are related records?


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

Recommended Posts

Posted

I have a script that checks field validations in a portal from a related table.

The script needs to check if there are not any related records, so it can skip the validation checks if this is the case

I had been using a 'Go To Related Record' script step and checking the LastError result to see if there are not any related records.

Is there a more standard way or stable way? Perhaps a field in the master table with a RecordCount of related recs?

Posted

Begin your script with:

If [ IsEmpty ( relatedTable::keyField ]

... do whatever because no related records exist

Else

... do whatever because you have related records

EndIf

Replace 'relatedTable::keyField' with your true relationship name and whatever field is the join key between the tables.

This topic is 6586 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.