How do I show different images from multiple states?
Create 5 tags of the Data Type Boolean and set the Data Source to Calculation. Then in the calculation field you would add the logic to convert the integer value to a Boolean state. For example, if you wanted to set a Calculation to True when an integer tag equals 3, it would look like this:
[SomeIntegerTag.Value] = 3
Then after setting up the 5 Boolean tags you set them up in a group in the oas-tag-src attribute of the image tag in HTML:
<div id=’test’ oas-tag-src='{
<< View All FAQs “type”: “group”,
“all_f”: “DefaultImageUrl”,
“bad_q”: “BadDataQualityUrl”,
“group”: [
{
“tag”: “SomeTag01.Value”,
“config”: “SomeImageUrl01”
},
{
“tag”: “SomeTag02.Value”,
“config”: “SomeImageUrl02”
},
{
“tag”: “SomeTag03.Value”,
“config”: “SomeImageUrl03”
},
{
“tag”: “SomeTag04.Value”,
“config”: “SomeImageUrl04”
},
{
“tag”: “SomeTag05.Value”,
“config”: “SomeImageUrl05”
}
]
}’></div>
As long as the 5 states are mutually exclusive and only one can be true at a time, your image will switch to the associated image in the group section of the attribute. If none are true, it will default to the all_f URL, and if any tag in the group has bad data quality, the image will switch to the URLin the bad_q section.
For more information on Calculation Tags and how to use them, see the following:
<< View All Troubleshooting Topics