Expand my Community achievements bar.

Combining codes, numbers and colors

Avatar

Level 3

I have been attempting to define a field via color when the number exceeds a certain percentage, in this case 80% My field will auto-calculate based on two other fields. Two avoid the syntax error I have the following code.

If(FirstLien>0 and SalesPrice>0) then LTV1st = FirstLien / SalesPrice;

endif

This is the code I am trying to use to change the field color.

if(LTV1st > 80.00) then LTV1st.ui.oneOfChild.border.fill.color.value = "187,234,160"

else LTV1st.ui.oneOfChild.border.fill.color.value = "208,208,208"

endif

These may be competing codes so i'm trying to figure out how to get the codes to work together. When the calulation code is on top, it doesnt work and visa/versa.

Can I link bothes codes together? I am using both codes in Formcalc in the calculate* event.

Thanks.

PS. I never enter the field so it cannot be an exit event or something associated with the user input on that field.

0 Replies