Jump to content

Testing for existing related records


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

Recommended Posts

Posted

Is there an easy way to test for the existance of related records?

Currently I create a field in the child that is a calculation = 1

I then create a calculation field in the parent that tests for the sum of the related records > 0

I would prefer only having to define a field at the parent level only if possible for a visual indicator of existing child records, and to use no fields at all if I am testing for child records in a script...

Posted

IsEmpty ( Child::ParentID )

Or, assuming you have a serial number in the child table:

IsEmpty ( Child::ChildID )

If the ID's are numbers, and they do NOT include zero, the test can be:

If [ Child::ChildID ]

# THERE IS AT LEAST ONE RELATED RECORD

...

Else

# THERE ARE NO RELATED RECORDS

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