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.

Script that Duplicates Records for Next Historic Set

Featured Replies

I am trying to write a script that will duplicate data, but change which book it is for...

Basically, If I have a set of data with the title field: "Book 1" I want to be able to run a script, and have it duplicate the data, though now titled "Book 2" So that both "Book 1" and "Book 2" are in the same table with identical records.

So if I started with 2000 records each with the word "Book 1" in the Title Field... I would now also have 2000 of the same records with "Book 2" in the Title Field.

Edited by Guest

One method is to add a new field to the table, title_for_export only. On the found set, execute a Replace field contents step and set it to replace with calculated result, = Substitute ( tablename::title_field_containing_book1; "Book1"; "Book2" ), perform with no dialog checked.

Next script step should export the found set; be sure to export title_for_export_only and NOT the title field with book1. Next script step, import the file back in mapping to the 'regular' title. May also want to replace the title with "" to clear it, before the import (just to keep DB file short). Map also any other fields req'd.

An alternate technique that provides more control is to loop through each record; if you do this, may want to use Go to Record by number with Get(Recordnumber) and Get(Foundcount) to keep track of which record you were processing, since creating a new record will move you to it. i.e. end loop when record>Get(Foundcount) recorded before entering loop, and before creating a record, record record number you were on so you can go back to it after creating new record.

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.