Posted Thu, 01 Jan 2015 06:00:00 GMT by Portal Admin

Q. Is it possible to set the color of string based on the results of a variable? Basically I would like to have a variable change to either green or red test color based on the results of another variable that read the state of a device.

If a variable is = 1 then text color in the output status is green; else the text color is red.

A. You would need to do a calculation based on the results of the first variable to set a second variable to the proper IMML color, which you can then use in the IMML for the status window to set the color.

Something like:

$myReadVar, 1.3.6.3.1.etc., DEFAULT, "The variable read from the device"
$myColor, (some calculation here), CALCULATION, "Calculating the color"
$myDisplayVar, blah, blah, blah


\$myColor\$myDisplayVar\0\
 

You must be signed in to post in this forum.