I'm a novice at scripting and events so my question is going to sound silly and may not use the correct terminology. Please look beyond that.
Using Formcalc, I'm multiplying a currency value against an exchange rate to give a value in US dollars. See "Calculation" below.
I'm trying to use field Actions to change the background/foreground colors when the result of this calculation is greater than a limit, in this case, 10,000. Using the action buttons produces the script below (See Format field if calculated result...).
The problem is that LCD inserts this code BEFORE the code for the calculation. Because the field has not yet been calculated, errors do not highlight.
I've copied the code from the two components into Notepad and I've tried to move them so they are in the correct order (see part three below). However, I get syntax errors.
You have the formatting code on the exit event of USD_value_1, however using a calculate event to assign a value will not fire the exit event. You need to add an action on the Currency_value_1 fields exit event, like;
If the Exchange_rate field can be entered by the form filler you will need a similar action (on exit of Exchange_rate) as well.