Jump to content

Global Container Repetition question


This topic is 6560 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have two global container fields, each with 5 repetitions.

I want to script the updating of the repetitions in g_containerA from the like-numbered repetitions in g_containerB. I've constructed the following script:

Set Field [ g_containerA, GetRepetition(g_containerB, 1) ]

Set Field [ g_containerA-2, GetRepetition(g_containerB, 2) ]

Set Field [ g_containerA-3, GetRepetition(g_containerB, 3) ]

Set Field [ g_containerA-4, GetRepetition(g_containerB, 4) ]

Set Field [ g_containerA-5, GetRepetition(g_containerB, 5) ]

When I run the script, only the first repetition of g_containerA is set from g_containerB. The other 4 repetitions in g_containerB remain empty.

Arrrrgh! What am I doing wrong? confused.gif

TIA for your help.

Platform: Mac / Version: OS 10.3

FileMaker Version: 6.0.4

Link to comment
Share on other sites

Jim McKee said:

I have two global container fields, each with 5 repetitions.

I want to script the updating of the repetitions in g_containerA from the like-numbered repetitions in g_containerB. I've constructed the following script:

Set Field [ g_containerA, GetRepetition(g_containerB, 1) ]

Set Field [ g_containerA-2, GetRepetition(g_containerB, 2) ]

Set Field [ g_containerA-3, GetRepetition(g_containerB, 3) ]

Set Field [ g_containerA-4, GetRepetition(g_containerB, 4) ]

Set Field [ g_containerA-5, GetRepetition(g_containerB, 5) ]

When I run the script, only the first repetition of g_containerA is set from g_containerB. The other 4 repetitions in g_containerB remain empty.

Arrrrgh! What am I doing wrong? confused.gif

TIA for your help.

Platform: Mac / Version: OS 10.3

FileMaker Version: 6.0.4

You're being too specific. It's understandable, seems like you oughta to things that way. But no; try this:

Set Field [ g_containerA, g_containerB) ]

Set Field [ g_containerA-2, g_containerB) ]

Set Field [ g_containerA-3, g_containerB) ]

etc.

FileMaker knows enough to map them properly.

If you are going to go with your original approach you need to make FileMaker think a little harder:

Set Field [ g_containerA, "" & GetRepetition(g_containerB, 1) ]

Set Field [ g_containerA-2, "" & GetRepetition(g_containerB, 2) ]

etc.

Platform: / Version:

FileMaker Version:

Platform: / Version:

FileMaker Version:

Link to comment
Share on other sites

This topic is 6560 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.