Expand my Community achievements bar.

SOLVED

highlight override field

Avatar

Level 2

I have built a form with several text fields with value "calcuated - user can overide".  At runtime and upon override I would like to change the fill color to clearly identify those fields that are overridden.  Any help would be appreciated.

Thank you!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi, the text fields value seems to get a override property set to 1 when the value has been override so I guess you could do something like this in the exit event of the field.  Only thing is I haven't seen any documentation on the override property

if

(TextField1.value.override == 1)

     TextField1.fillColor

= "150,130,33";

else

     TextField1.fillColor = "0,0,0";

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

Hi, the text fields value seems to get a override property set to 1 when the value has been override so I guess you could do something like this in the exit event of the field.  Only thing is I haven't seen any documentation on the override property

if

(TextField1.value.override == 1)

     TextField1.fillColor

= "150,130,33";

else

     TextField1.fillColor = "0,0,0";

Avatar

Level 10

Hi,

Here is a sample that looks at the initial value of the field (on entry) and then checks to see if the value has changed on exit.

There is script in the enter and exit events (and of course the calculate event). Please note that there is a script object called "Utils" that you would need to have in your form as well.

Hope that helps,

Niall

Avatar

Level 10

Hi,

Bruce's solution is much neater. The override works more reliably than checking the initial value. It also does away with the script object and enter event.

Here is a comparison.

Good luck,

Niall