Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I am trying to set repeating global container fields with a script.

There are two icons.

The is a choice field of ABC or D

There is a repeating container field that I want the script to set all repeats the same except the field that corresponds to the choice (ABCD)

Please attached

setContainer.zip

Posted

Looks like there's a bug when using the Set Field command for a repeating field in combination with the Get Repitition command (global fields or not, container fields or not) - at least in FileMaker 5.5. frown.gif

Instead of using a Repeating Conatiner field for the Icons, separate it out into two fields: gIcon1 and gIcon2. Everything then works fine.

  • Set Field ["gImage", "If(gChoice = "A", gIcon1, gIcon2)"]
    Set Field ["gImage"-2, "If(gChoice = "B", gIcon1, gIcon2)"]
    Set Field ["gImage"-3, "If(gChoice = "C", gIcon1, gIcon2)"]
    Set Field ["gImage"-4, "If(gChoice = "D", gIcon1, gIcon2)"]

Yet another good reason NOT to use repeating fields. frown.gif

Posted

Harry is correct. You must use an intermediate field to copy from one repeating field to another or eliminate one of the global fields. This is unlikely to be fixed as repeating fields are a dead issue and to be avoided in almost all cases.

-bd

This topic is 7776 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
×
×
  • Create New...

Important Information

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