Status BG Colors - Manual

Overview

The statusBGColor logic basically allows System Integrators to add a string tag to a "Smart Label" component which will then allow the color of the value portion to be customized based on a designated point and value.

Example 1: statusBGColors: {"statusTag":"curVal","true":"#ff0000", "false":"#47a3da"}

  • if curVal is true, set color of background to #ff0000 (red).

  • If curVal is false set background color to #47a3da.

Its all comma separated and the user can pick any tag they want..it doesn't have to be curVal like in our example. Make sure to include the curly brackets in the value.

The string property looks something like this:

String property tag name = statusBGColors. The value = {"statusTag":"curStatus","ok":"#ff6677", "fault":"#33ff55", "down":"#0f0f00"}

  • If certain status of a tag isn't specified, it defaults to the normal background.

  • Our theme blue is "#47a3da".

  • Use http://www.color-hex.com/ to get the color hex code.

Using Apply Batch Tags

If you want to use apply batch tags, you have to escape the quotes.

Like this for boolean/enum = statusBGColors:"{\"statusTag\":\"curVal\",\"true\":\"#ff0000\", \"false\":\"#47a3da\"}"

Like this for number = statusBGColors:"{\"statusTag\":\"curVal\", \"0,0\":\"#47a3da\", \"0,50\":\"#ff00ff\", \"50,100\":\"#ff0000\"}"

Like this for boolean alarm points (look below for alarm points logic) = statusBGColors

Using with Points with "alarmPoint" (Auto)

If the point in DB Builder or in VirtualPoints (Graphic Builder) is tagged as "alarmPoint", then all you need to do is tag the smartLabel as "statusBGColors" marker tag. This will make the value color be red if true and normal if false.

To reverse the color logic, add "reverseAlarm" marker tag on the point in DB Builder. This would make it dynamic on relative graphics where some points might be true=alarm and some false=alarm. (NOTE: If "reverseAlarm" marker tag exists on the virtualPoint in Graphics Builder, remove it because it'll be like hardcoding it which we don't want)

Custom Colors

If the user would rather have their own custom colors, then they can still use the original method IF the point doesn't have the alarmPoint tag on it. If it does, you'll need to add the following option in the string so that the current alarm logic doesn't overwrite it. ("noOverwrite":""). For example: statusBGColors: {"statusTag":"curVal","true":"#ff0000", "false":"#47a3da", "noOverwrite":""}

Using with Numeric/Enum Ranges

If users wants to specify the smartLabel to be a certain color based on a number value or range, then they can use "0,0" for whole number or "1,100" for range. If the value does not meet any of the parameters, it defaults to the theme color. If using negative numbers, make sure its in the correct format order. For example not "0,-50" because 0 is not less than -50. It instead should be "-50,0". Another example, not "100,50", but instead "50,100" etc.

New Status BG Colors tool