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.

Featured Replies

Hi. I have a field with a script trigger that passes 2 parameters to a script; 1) the name of a related table (as literal text), and 2) a field's object name. I use this script for different fields on different layouts and have so far been using "If" statements to decide what to do, e.g.:

 

If [Get ( ActiveModifierKeys ) = 16]

     If [$relatedTable = "People » Projects"]

          Go to Related Record [ From table…etc.]

     Else If [$relatedTable = "Company » Projects"]

          Go to Related Record [ From table…etc.]

etc.
     End If
End If
 
This all works fine, but obviously breaks if I change the TO name. I know I can pass the field as an actual field name (not literal text), but once it's in my script, how can I use that without testing using literal text? It seems I have to go through the "If" tests, and if that's true I'm not sure how to incorporate GetFieldName or something similar to go to the correct related table and layout.
 
Thanks for any help with this.
 
Michael

You could make this generic by not using a Go to Related Record script step, but going to a layout based on the target TO and doing an find.

 

It will require a strict naming convention where you would prefix layouts with the TO name so that you can construct the desired layout name easily.

 

In this scenario you would pass a field reference into your script and use the RelationInfo() function to find out what fields you need to use to make a find that mimics a GTRR call.

  • Author

Thanks, Wim. I do use that naming convention on my layouts, so this looks perfect. Much appreciated.

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.