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.

Duplicating All records from found set

Featured Replies

I am trying to set up a step by step training manual for my cabinetshop. Some of the things we build use essentially the same steps as other things we make. I would like to be able to develop a task list for one product then use that same task list again for something else.

[color:red]I would like to start from a FOUND SET then duplicate just those records with a script.

Can somebody suggest a way to do this?

Thanks,

Jarvis

Hi Jarvis!

Try:

Go To Record/Request [ Last ]

Loop

Exit Loop If [ not Get ( FoundCount ) ]

Duplicate Record

Omit Record

Omit Record

End Loop

... if there are things you want to do to the new record, insert those lines immediately after the Duplicate Record. The set should not be sorted ... if sorted, it will slow the script down. And back up first. If you need to preserve the newly created records in a set, let us know and it can be adjusted but I usually take care of the new record's needs immediately while ON it.

BTW, some people recommend exporting then importing the set. But each time you move data out then back in, you risk error.

Edited by Guest

  • Author

Thank you LaRetta.

I'm sure I could have stared at this problem for a million years and not got around to the [not Get (Foundcount)] part of the incantation. I don't know what that does but I will take it on faith because it seems to work.

I would like to be able to act on the created records as a set (distinct from the rest of the database) Do I need to burn incense while running the first script to make this happen, or is there another way to keep these newly duplicated records up on deck?

Thanks again,

Jarvis

It isn't as pretty but no incense required. You must sort your set. Sort by something unique like the ID - because if you sort on a field with two identical values, it will probably mess you up. The reason is that we need the newly created duplicate to appear immediately below the record it duplicates (so we can isolate it). And we'll need to start at the top. Why? Because FM did not think through the logic of their 'Exit After' checkbox and - on Go To Record/Request [ Previous ], they only allow 'Exit After LAST' when they should have allowed Exit After FIRST. // endRant

Sort Records [ without dialog]

Go To Record/Request/Page [ First ]

Loop

Duplicate Record

Go To Record/Request/Page [ Previous ]

Omit Record

Go To Record/Request/Page [ Exit After Last ; Next ]

End Loop

Oh. In the first script, not Get(FoundCount) means no records left to process and tells FM to exit the loop if there are no more records. :wink2:

Edited by Guest
Reworded some of it

  • Author

Thanks LaRetta!

You really helped me out

Jarvis

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.