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.

Processing the results of a "find"

Featured Replies

I've written a set of scripts and layouts which together produce a "found set" of records. How do I write a script which goes through each of these records and changes a field in each?

Just in case it complicates things, the records in the found set are of two different types. Depending on the type, the field that I want to edit will change.

I'm not sure I understand what you mean by two different types? Do you mean Date vs Number vs Text?

Create a List layout to view the found set. Your script would look something like this:

Go To Layout(ListLayout)

Sort Records()

Go to Record/Request(First)

Set Variable($ChangeToData;"Yellow")

Loop

If(FieldtoChange<>$ChangeToData)

Set Field(FieldToChange;$ChangeToData)

Go to Record/Request(Next; Exit after last)

else

Go to Record/Request(Next; Exit after last)

EndIf

EndLoop

*/All my scripts always need a little tweaking, but, this is the general idea.

hth

///It's a good idea to always back up your files before changing lots of data records. Especially in the development stage.

Edited by Guest

  • Author

That's great, thank you!

Don't worry about the different "types" of data, I managed to get round that problem. What I was stuck on was how to iterate through a found set.

Btw, if you want to check each record to see if a specific field is equal to another rather than hard code the new field data you should add the variable in to the loop.

Go To Layout(ListLayout)

Sort Records()

Go to Record/Request(First)

Set Variable($ChangeToData;LookintoField)

Loop

If(FieldtoChange<>$ChangeToData)

Set Field(FieldToChange;$ChangeToData)

Go to Record/Request(Next; Exit after last)

else

Go to Record/Request(Next; Exit after last)

EndIf

Set Variable($ChangeToData;LookintoField)

EndLoop

Edited by Guest

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.