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.

Replace in portals

Featured Replies

  • Newbies

Hello all

I'm trying to imitate the replace function in a portal. I used to have a pop-up menu so everybody is used to just choose a value and replace it in the current found set. Now that field is a portal, because I need it to hold more than one value. How would I set a selected list of records to one specific value in a portal? The problem is, that maybe some of the records already have that value. The script should just add the value to those records that don't have it yet.

If you have an idea, please let me know.

  • Author
  • Newbies

Well, I figured something out. Somehow it does not look very elegant, but it works.

Set Variable [ $tag; Value:_tags::special_features ]

Go to Record/Request/Page [ First ]

Loop

    Go to Field [ _tags::special_features ] [ Select/perform ]

    If [ _tags::special_features = $tag ]

    	Go to Record/Request/Page [ Next; Exit after last ]

    	Go to Portal Row [ First ]

    Else

    	Go to Portal Row [ Select; Next ]

    End If

    If [ IsEmpty ( _tags::special_features ) ]

    	Set Field [ _tags::special_features; $tag ]

    	Go to Record/Request/Page [ Next; Exit after last ]

    	Go to Portal Row [ First ]

   End If

End Loop

Commit Records/Requests

Setting values in portals with looping scripts can get a little messy, especially if you need to add something later that changes the focus in the middle. It's generally better to jump to the related records and do the processing in there. Since you're replacing the value of a single field for all related records, you can employ the Replace[] function:

Set Variable [ $tag; Value:_tags::special_features ]

Go to Related Records [ Show only related records ; _tags ; layout: ]

Replace [ _tags::special_features ; $tag ]

Commit Records [ No Dialog ]

Go to Layout [ original layout ]

If the processing of each record were more complex, you could use a loop to go through all the records one-by-one, and set whatever you need to with branching If[]s and Set Field[]s (in this case, commit the record at each iteration.)

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.