Sometimes you may want to show an icon for a boolean flag instead of "Yes" / "No", or "Enabled" /"Disabled". Using icon decorators you can do this for simple boolean flags as well as calculated rules.
1. First create an attribute that displays the value in a human readable textual form. This can go on the value and tooltip properties of the virtual silo attribute:
Boolean flag:
If(Attributes.enabled, "Yes",
"No")
UserAccountControl:
If(BitAnd(Attributes.userAccountControl, special.AD.ACCOUNTDISABLE), "Disabled",
"Enabled")
2. Next add a decorator. You may choose to put the icon before or after the value, or replace the value completely. Choose a positive and negative icon, like a checkmark and a cancel circle. For example:
Version <= 4.3.10: "cancel", "check_circle"
Version >= 5.0.1: "cancel" or "close-circle", "check-circle", "check"
So the decorator rule could be:
If(BitAnd(Attributes.userAccountControl, special.AD.ACCOUNTDISABLE), "cancel",
"check_circle")
Comments
0 comments
Please sign in to leave a comment.