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.

updating a script with repeating fields

Featured Replies

I've created and exhaustive script that validates the entry in a particular field.The validation forces the user's entry into a standard form. I've now decided that I need repetitions for this field because users are inclined to enter multiple values in this field for expedience which will only standardize the first value. There are a maximum of 5 repeating fields. So to make a long story short.... I want to edit my validation script to loop through all repetitions, if they exist. What is the quickest way to change all the references to that field to now include a repetion number fieldname[n].

It's not entirely clear what you're asking. You can insert values into a specific repetition by entering the repetition number where you select the destination field. You can retrieve a specific repetition by using the array notation:

repeating field[repetion number]

However, it's generally better to use a related table to hold a variable amount of user-editable data, like this. A portal can be used to edit or show it, and you can loop through them if needed.

It's pretty easy if you already have the script working for one field. Just use subscript notation, such as field[$i] (FM8) or field (FM7). Use your loop construct to bump the value of i or $i.

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.