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 Problem

Featured Replies

I have another file showing the related records of the "constellation_join" file. Say I get 3 matches. The script in the "constellation_join" file is supposed to loop through all the results, make a duplicate of each record and change two fields on each record. The script is as follows:

Goto Record/Request/Page [First]

Loop

Duplicate Record/Request

Set Field ["Ongoing CY ID", """"]

Set Field ["CPS Investigation ID", "relationship::CPS Investigation ID"]

Goto Record/Request/Page [Exit after last, Next]

End Loop

What is happening is it only goes to the first record, duplicates it, and then exits the loop. I've put pauses in, and it does list all the records in the found set (i.e. 3 out of 170), it just seems to quit after it's done with the first record.

I've done loops before, and I can't find any differences loop-wise that would be causing it to do what it's doing. I'm sure it's something completely simple, but it's driving me crazy.

If you don't have the records uniquely sorted, then the duplicate will appear at the bottom of the found set. Then when you Go to Record/Request/Page [Exit after last, Next], you have passed the end and the loop is complete.

Try sorting the records by a unique field that will be the same in the duplicate. I usually renumber a sort field from 1 to X, and use that. Then your duplicate will appear directly underneath the current record, and Go to Record/Request/Page [Exit after last, Next] will work as desired.

Duplicate can work 2 different ways. If the records are Unsorted it will put the duplicate at the end, which is what's happening. Hence it exits prematurely. If however you Sort the records (can be by anything, even a Constant=1, which doesn't appear to do anything), then the duplicate will be put immediately after, and it stays sorted, so you can Loop. That's what you'd want.

Yikes! Queue is right. It has to be by a unique ID. I must have been thinking of something else (or not thinking at all :-0)

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.