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 contents of repeating fields

Featured Replies

Hello, all:

I have a repeating field (DBCR Number) with 100 repetitions. In a second table, I have another repeating field (DBCR Mod), also with 100 repetitions. I want to write a script that copies the data from all of the repetitions in DBCR Number to the corresponding repetitions in DBCR Mod. I have tried using Set Field and specifying "100" for the repetitions of the target field DBCR Mod, but it only changes the value of the first rep. Can someone show me how to do this? Thanks in advance ...

Portals not repeaters right?? Here should be plenty to go on for the skilled, please note the comments comes in reverse order, start with the last first and then worm you to the first shown:

http://blinkerfish.blogs.com/__fmcollective_old/2007/04/creating_multip.html

--sd

To do exactly what you described, you will need to use 100 SetField[] steps.

There may be other ways to achieve your goal, but you haven't told us what that is. For example, do you need to do this in one record at a time or in all records, is this a one time modification or an everyday action, why does the same data need to be stored twice - in other words, we need to know the context and the purpose in order to give more intelligent advice.

  • Author

SD and Comment:

Thanks for the quick replies. It needs to happen to on a single-record basis, but it will happen every time a new record is created. The DBCR Mod field will be editable by a privilege set that is not allowed to edit the DBCR Number data. The DBCR Number is sort of like an "as-designed". The DBCR Mod is like "as-built".

  • Author

Comment and SD:

OK, I figured it out. Haven't worked alot with repeating fields until now. Comment, you were right about the 100 set field steps. I also had something broken in one of my relationships that I didn't see until I stepped through the script. Thanks for all of your help ...

As long as you make it similar to this:


Set Variable [ $row; Value:1 ] 

Loop 

     Set Field [ Untitled::repeatB[$row]; Untitled::repeatA[$row] ] 

     Exit Loop If [ $row=100 ] 

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

End Loop 

That being said is copy'ing, not a sign of a properly structured solution - with relational databases are the goal to have data atomicly stored in just one location, from where it then is referenced. Syncronizations like this are usually attempted prevented.

--sd

To do exactly what you described, you will need to use 100 SetField[] steps.

One Set Field step nested in a Loop is all he needs. Repetitions can be set by calculation.

To me that's still 100 steps, only automated.

In any case, if this is only for setting the field to some initial values, a lookup should do just fine.

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.