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.

Loop Script

Featured Replies

Found this script in FM Help and I'm trying to implement it into my DB.

In the following example, you create a script to clear the contents of a field with five repetitions

count=1

Loop

Clear [select;FileName::FieldName[count]

count=count+1

Exit Loop If [FileName::count=5]

End Loop

What is [count] at the end of the Clear script?

What goes in here, the word count, the value 1? And how do I get it in there, does it go in the Repetitions box?

Also count=count+1, there is no script step for count that I can find, I found it in the Calculation box, but how do I get it into a script step?

Yes, I know you all hate Repeating fields, and I should be using Relationships and Portals, but this is a simple 1 layout design, with no extra relationships or tables. I just want to be able to clear the repeating fields with 1 script.

Many Thanks

Here's an example showing the script, and its use on a button to clear repetitions.

clearReps.fp7.zip

Steer clear of repeaters, with your skill level is it called:

Go To Related Record[Found Set]

Delete All Record[No Dialog]

--sd

It's never too early to learn to error trap.

I know you all hate Repeating fields

I do not hate repeating fields, only the abuse of them deliberately violating relational concepts!

--sd

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.