Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts, hoping someone can help me.
I'm looking to have a visual cue/ color change when the following happens....
I have a variable named "new" and a variable named "old". I want my text box/expression to go green when the difference between the new and old variable is less than 3.02, else it is red.
My "new" variable is a calculation and my "old" variable is a manual entry by the customer.
i assume is it just an if statement within the visual cue/ background color? any ideas would be appreciated.
thank you,
Ciarán
Hi, you can use an expression like: If(fabs(($(oldVarName))-($(newVarName)))<3.02, Green(), Red())
This can be in the background color or in the font color.
Fabs() is to consider absolute value of the difference, you can remove if you only want to validate positive changes.
Hi, you can use an expression like: If(fabs(($(oldVarName))-($(newVarName)))<3.02, Green(), Red())
This can be in the background color or in the font color.
Fabs() is to consider absolute value of the difference, you can remove if you only want to validate positive changes.
Hi Rubenmarin,
thank you for your response. I tried your suggestion but it didn't seem to work for me:.
this is your expression with my variables:
then my "UGBL"(old) variable is dynamic so the user can enter in whatever they want:
then the calculated UGBL(new variable) in my table should go green/red, but it doesn't. any ideas?
thanks
Just making sure, you are entering that formula into either the Background Color or Text Color property of the expression?
What other fields are in your table (if any)?
im entering it in both but not seeing any changes in the output of the text
You may have typo in your variable from what I noticed, calculated is spelled caluclated, that may be why it is not working....
Regards,
Brett