Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

The following 3-step sequence is from a script that had worked for months. It simply populates a repeating field that holds working parameters. But this week I was blindsided by a change in its behaviour that took me hours to isolate and rectify. Even though I've restored the script’s operation, I can find no clear (i.e., documented) explanation of the root cause.

Set Field [ Table::Param ; Base::FieldA ]

Set Field [ Table::Param[2] ; Base::FieldB ]

Set Field [ Table::Param[3] ; Base::FieldC ]

But then I changed Init::FieldC to be a repeating field of 3 occurences (a push-down stack, actually -- used to hold prior values). A major runtime process started producing inapproriate results. Since this was a field-proven code, it took me a while to even look at these steps as suspect. The clue, however, was that Param[3] was being set to one of the prior values. I restored proper operation with the following:

Set Variable [ $Value ; Base::FieldC ]

Set Field [ Table::Param ; Base::FieldA ]

Set Field [ Table::Param[2] ; Base::FieldB ]

Set Field [ Table::Param[3] ; $Value ]

As an experiment, I set the third entry to:

Set Field [ Table::Param[3] ; Base::FieldC[1] ]

... and it worked properly, as well.

I've concluded that when the Init field was extended to 3 occurences, the Set Field picks up the third value when no index is specificed. BTW, all of these fields are defined as text fields.

So I ask: Is this a known syntax rule? ... or a feature? ... or a bug?

If it is a rule, are there corresponding rules for If statements? -- or can "no index" still be used to specify the first value?

Thanks in advance for any help.

This topic is 5010 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.