AnsweredAssumed Answered

Conditional Formatting conflict with Scripts?

Question asked by BFCSteve on Mar 6, 2012
Latest reply on Mar 13, 2012 by philmodjunk


Conditional Formatting conflict with Scripts?


I have the last version of FM Pro v10 and I appear to have run into either a bug or really strange behavior.  Hopefully someone can help me work around this problem.

A user is asked to create a simplified representation of a complex concept using 10 separate Fields, each contiaining 1 or 2 words.  The available word choices for each Field are put into a Popup based on the previous Field's chosen word.  Meaning, the words avaialble for FIELD_5 are based on what was chosen for a word in FIELD_4, or sometimes a combo of Fields.  The context choices are defined in a Table and filtered using various Relationships.

For example, the first four fields might look like this in two different examples:

I  ; Love ; To Drink ; Water

We ; Hate ; Driving ; Slow

Because of the dependency on the previous Word choice, the user must set the Fields in order since that's the only way to get the conditional relationships.  To help with that, each time a user changes a Field a Trigger is used to launch a Script that resets all subsequent Fields from that point on since the values are likely invalid.  For example, if I changed Love to Hate (FIELD_3) FIELD_4 through FIELD_10 have their values wiped out using SetField and a value of "".

To help the user understand the progression I use Conditional Formatting to change the color of the next empty Field when the previous Field is set.  The user can also skip Fields in some defined cases so the Conditional Formatting uses Calculations to determine if it should change color or not.

OK... so all of this works beautifully except for one thing!

When FIELD_1 is reset it's Trigger tells the Script to wipe out all values in all Fields starting with FIELD_2 and going through to FIELD_10.  The problem is that no FIELD_2 will not reset no matter what, yet it is instructed to clear out just like all the others (which do clear out).  Script problem?  No.  The script was running fine for weeks before I thought of adding Conditional Formatting.  It also still works fine in a similar context which has no Conditional Formatting in the Layout.  And if I remove Conditional Formatting in the problematic Layout FIELD_2 is propperly wiped clean.

Long story short... Conditional Formatting is somehow preventing a single SetField Script step from performing it's function.