Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

NOT Going to All Records if None are Found

Featured Replies

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!

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

  • Author

Ender,

Thank you for the tip!

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 ?

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.

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 ?

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.