Jim McKee Posted February 9, 2004 Posted February 9, 2004 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? TIA for your help. Platform: Mac / Version: OS 10.3 FileMaker Version: 6.0.4
bruceR Posted February 9, 2004 Posted February 9, 2004 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? 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:
Jim McKee Posted February 9, 2004 Author Posted February 9, 2004 Bruce ... Worked gr8! Don't know why it works, though. Can you point me to something in the docs, a KB artnum or something that explains this? Thanks a million X 5 repetitions Platform: / Version: FileMaker Version:
Recommended Posts
This topic is 7597 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 accountSign in
Already have an account? Sign in here.
Sign In Now