Skip 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.

Does an Error Code Exist for No Related Records Found?

Featured Replies

Hi All, I've written a script that checks if a related record (R/R) exists for the current record using the find process. If a R/R exists the script automatically goes to it, if no R/R exists (error code 401) the script asks if one should be generated.

I would like to use the GTRR script step rather than a find but I can't find an error code to match no R/Rs found in this case?

Thanks Peter :-)

Edited by Guest

Try using the isValid script step.

If [ IsValid(Graphic link|::Container) ]

Go to Related Record [ Graphic link| ]

Else

Show Message [ Buttons: “OK”, “Cancel”, “”; Data: “No Related Record exist.” ]

End If

HTH

Lee

  • Author

Hi Lee, I'll give it a try, I was hoping there might be an error code for no R/R found but maybe there isn't.

Thanks Peter :-)

Edited by Guest

You could also just use

Set Variable[$layoutName ; Get(LayoutName)]

Go To Related Record[GraphicLink]

If[ $layoutName = Get(LayoutName)]

#Create the record

Else

Go To Related Records [ You know this bit ]

End If

--If there aren't any related records you remain on the same layout.

or use isEmpty on the primary key field in the related table.

If[ IsEmpty( RelatedTable::PrimaryKeyField )]

#Create the record

Else

Go To Related Records [ You know this bit ]

End If

This one may or may not also work:

415

One or more required related records are not available

Edited by Guest

You can also set error capture on, try to go to related record and read the last error state. That is

Set Error Capture[ On ]

Go To Related Record[  ]

Set Variable[ $$error, Get( LastError ) ]

Set Error Capture[ Off ]

I don't remember the error code exactly, but it certainly exists.

101 - Record is missing

But it seems neater to do the test beforehand and branch accordingly:

If [ not IsEmpty ( Child::ParentID ) ]

Go To Related Record [ Child ]

# Do the stuff

Else

# Do something else

End If [ ]

  • Author

Thanks to everyone for their ideas, I'll experiment with the ideas later on when it's less than 35 degrees Celsius :-)

My script currently checks if a R/R exists first then branches from there, it's just using the find record step, etc. was a bit messy so I was hoping this could be accomplished in less steps.

Cheers Peter :-)

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.