Binding Associations
Binding Associations are used when there is no direct way of converting a tag value to a property, i.e. converting a Boolean value to a color. Associations allow you to create a mapping table that specifies the value to use for a given tag. Associations can also be used to convert from an integer to a color, a Boolean to a string, and/or a string to a color.
For example, an Ellipse can be added to a Page, and its Color parameter could be set as an association to a Boolean result, where False would indicate Red and True would indicate Green.
- To create an association, add an Ellipse to the Page.
- In the Ellipse Properties, click the grey dot beside the Color parameter to launch the Expression Builder.
-
Press the Add Tag button and select a tag that returns a Boolean result.
-
Press the Associations button to create the conversion association. An Invalid Type dialog will be presented, press the Yes button to continue.
-
Uncheck the Add Association Checkbox, and then press the Add
button.
-
From the color drop-down menu, select Red for False.
-
Press the Add button again, and from the color drop-down menu, select Green for True. Press the Accept button to complete the association.
-
Put the Page in Test Mode, and the Ellipse should be filled with the color Green when the result returns True, and Red when it returns False.