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.

Perform Find, then Extend Found Set inside a loop?

Featured Replies

I want to create a found set based on a (return-delimited) list that I paste into a global text field, i.e.,

 

Mary

Fred

Joe

 

I've got something that works; I'm wondering if doing a Perform Find prior to the loop, then using Extend Found Set in the loop is typical. It works. I just end up with (possibly a few) lines of redundant code:

#Get the number of values in the global field:
Set Variable [ $valueCount; Value:ValueCount ( Create found set from a list of values::gValues ) ]

Set Variable [ $incrementer; Value:1 ]

Set Variable [ $value; Value:"=" & """ & GetValue ( Create found set from a list of values::gValues ; $incrementer ) & """ ]

Perform Find [ Specified Find Requests: Find Records; Criteria: Create found set from a list of values::database_num: “$value” ] [ Restore ]

Loop
  Set Variable [ $value; Value:"=" & """ & GetValue ( Create found set from a list of values::gValues ; $incrementer ) & """ ]
  Extend Found Set [ Specified Find Requests: Find Records; Criteria: Create found set from a list of values::database_num: “$value” ] [ Restore ]
  Set Variable [ $incrementer; Value:$incrementer + 1 ]
  Exit Loop If [ $incrementer = $valueCount +1 ]
End Loop

Also, I'm using $valueCount to get the number of values in the global text field, but I think if I had a value like: "Mary Smith", and possibly blank lines between lines with data, the script wouldn't work as expected. I need to look further into that. thanks

Could this be done with gtrr from the global field?

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.