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.

Looping Variables

Featured Replies

Is it possible within a filemaker script to do the following.

I want to loop through a set of records for each record set a variable equal to the value of a particular field for each record

So that afterwards I will have a set of say 10 variables (if there are 10 records in the found set) each one matching a value in a particular record

Say for example

Var1 = Feild Value from record1

Var2 = Field value from record 2 etc...

In other places I would use a combination of for...next loops but how to go about it in Filemaker?

Thanks

John

  • Newbies

Use a loop, and then a global field (for an array), a series of global fields (for storing independent variables) or a related file to store the values.

The your script can run:

Go to Record/Request/Page [First]

Set Field [gVariableArray, ""]

Loop

Set Field [gVariableArray, gVariableArray & "|" & YourFieldValue]

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

End Loop

THis will get the delimited array of variables from the current found set into the gVariableArray text field.

  • Author

Thanks for that. The only other step I need is how to get this array back out into individual fields

I suspect that the answer to your problem is extremely simple. It's the question I can't understand.

You seem to be saying that you want to go to each record in turn, grab a value from a particular field, then place that value in another field.

This doesn't make sense.

Can you explain a bit more please.

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.