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

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

Recommended Posts

Posted

FM 8v2 with Server 8v2

I have a script with a step that reads as follows:

Go to Related Record [show only related records; Match found set; From table: "Spots"; Using layout: "spots" {Spots}]

After that line in the script, concatenation is done based upon the results of that script step. What I am observing is that if there are no (zero) related records in the Spots table, I am getting a concatenation of ALL the records in the Spots table (which are unrelated to the record I am currently working with).

Is it possible to skip the subsequent series of steps if the number of related records is zero, as opposed to proceeding with the script for ALL records in the table? Conceptually, perhaps something like "If the number of related records is zero, do nothing".

Any assistance is greatly appreciated. Thanks for reading!

Posted

Test for the presence of related records prior to the Go to Related Records[] step:

If [ relationship::recordID ]

Go to Related Records []

...

Else

# No related records

End If

Posted

I've always considered this "feature" to be rather strange I think it only shows all records ( when there are no related record ) from V7 onwards. Does anyone else think this is an unwanted result and should we request FM to remove it ?

Posted

It may have been intentional. Anyway, this was covered in the FM7 migration tech brief as something to be aware of.

It's interesting to note that if the GTRR is set to use an external table's layout, and there are no matches, the found set of 0 results (at least in FM7v3 and FM8v1.)

Another interesting behavior is if the GTRR is set to use a table in the same file, and there are no matches, the Go to Layout part of the GTRR will be skipped. One more reason why testing for the presence of related records ahead of time is a good idea.

Posted

I think it probably was intentional, I just can't think why. Surely going to related records should ALWAY do just that ie if there are no related records actually going to the table/layout specified albeit with zero found records ?

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