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.

Copying content of a repeating field into another repeating field

Featured Replies

  • Newbies

Hi,

I want to copy the content of all the repetitions of a repeating field into a repeating field from another table. Can this be done with a simple script step or do I have to use 14 instances (one for each repetition) of the "Set Field" script step?

Edited by Guest

Provided that the two tables are related, which is pretty self-contradictionary - could this be done:

Set Variable [ $which; Value:1 ] 

Loop 

       Set Field [ Untitled2::Rep2[$which]; Untitled::rep1[$which] ]

       Set Variable [ $which; Value:$which+1 ] 

       Exit Loop If [ $which=14 ] 

End Loop 




Although the relation could be a cartesian. Otherwise must it be done this way:




Set Variable [ $i; Value:1 ] 

Loop 

       Set Variable [ $what[$i]; Value:Untitled::rep1[$i] ] 

       Exit Loop If [ $i = 14 ] 

       Set Variable [ $i; Value:$i+1 ] 

End Loop 

Go to Layout [ “Untitled2” (Untitled2) ] 

Loop 

      Set Field [ Untitled2::Rep2[$i]; $what[$i] ] 

      Exit Loop If [ $i = 1 ] 

      Set Variable [ $i; Value:$i-1 ] 

End Loop 

But due to the obvious syncking issues shouldn't you rely on solutions using this. Ditch repeaters you can live perfectly well without them, you're violating both 1NF and 2NF - so better have very good arguments ready for doing so!!!

--sd

Hi,

I want to copy the content of all the repetitions of a repeating field into a repeating field from another table.

Why? It is highly likely that you will be better off spending your time getting rid of the repeating fields and using the relational features of FileMaker.

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.