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.

Script that looks at a field in a portal row

Featured Replies

Portal containing a button. Script is:

If["Last Name>0"]

Go to Related Record ["Names"]

Go to Layout ["Personal"]

Else

Go to Related Record ["Names"]

Go to Layout ["Company"]

End If

The problem is the script is looking at the field "Last Name" in the record layout. How do I have it look at the field in the portal row where the button resides?

LR

Create another relationship relating a global to Last Name.

gLastName (global, text)

"newNames" relationship gLastName <--> Last Name

"New Button"

If[not IsEmpty(Last Name)] <-- Last Name > 0 will never be true, unless Last Name contains a number (Jones3).

Set Field (gLastName, Names::Last Name)

Go to Related Record ["newNames"]

Go to Layout ["Personal"]

Else

Go to Layout ["Company"] <-- If Last Name is empty, there is no related record to go to!

End If

-bd

  • Author

That one works, but with one limitation.

The script changes the global field to match the last name. That means of course all the global fields now would have, for example, "Ross" in them. Then of course it goes to the related record that the last name is "Ross." But what if there are 2 records with the last name. So in my portal I select the 2nd of the 2 "Ross" records, run the script, and it ends up going to the related record of the 1st "Ross."

But this of course is not a shortcoming of the script, but of my layout. All I did was create a calculation field that combines the first and last name fields, then point the script to the calculation field instead of the last name field, thus avoiding the conflicts.

Thanks for the tip...worked like a charm.

LR

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.