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.

Need to get data INTO a repeating field

Featured Replies

I have a database that uses repeating fields for customer contacts. I have separated these into individual records when I import into a new database, and am now using relationships.

The Problem:

Original creator used repeating fields for first name, last name, phone, title, BUT he used individual fields for notes! (Notes1, Notes2, etc) and "lined them up" with the repeating fields!

I can't get these notes to separate into the individual records, of course - all 5 fields come into each record.

How can I get the five fields into a repeating field just long enough to separate them properly upon import into the new database?

I used a caclulated repeating field (notesfield) to get all 5 notes fields into one field, but it only fills the first repetion

"notesfield"=

If(IsEmpty(Notes1), "", Notes1)& "

Hello,

Write a script. Set up a loop where for each record you copy Note 1 and paste it into your new repeating field of Notesfield level 1, copy Note 2 and paste it into Notesfield level 2, etc. Go to next record and repeat. It doesn't care if anything is in the field or not. FMP will cycle through several thousand records quickly.

take care

steve

You might like to set up a script, which runs along the lines of:

Show All Records

Go to Record/Request/Page [First]

Loop

Set Field ["RepeatingNotesField", "Notes1"]

Set Field ["RepeatingNotesField" -2, "Notes2"]

Set Field ["RepeatingNotesField" -3, "Notes3"]

Set Field ["RepeatingNotesField" -4, "Notes4"]

Set Field ["RepeatingNotesField" -5, "Notes5"]

Go to Record/Request/Page [Exit after last, Next]

End Loop

To set the repetition number for each of the Set Field commands, look for the repetition number entry box at the lower left of the 'Specify Field' list dialog for that script step.

  • Author

Thank You!

I didn't notice the repetition number entry box in the "Specify Field" dialog, but this should do the trick!

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.