Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Reply would be great

cheers, genx

Posted

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.

Posted

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

Posted

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.

Posted

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

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