Dynamic Image path

Hello Everyone,
I am using Image component and I have tag name fault, Whenever I see 1 in fault I would show red cross image otherwise green checkmark image. I need to change image path in Image component, I want to bind image path to tag(fault) but I don’t wont it to take a value of tag just want to check and move string in path. How do I achieve this? I am pretty sure I need to use expression in binding but not sure how to do it. I am using Vision module.
Thank you for your time.

Add an expression binding to the Image Path property of the component:

if({[your provider]path/to/fault/tag},'path/to/image/when/faulted','path/to/image/when/not/faulted')
2 Likes

Great.Thank you. That’s what I wanted.

Are there map transform in vision ?
If there are, you can also do this:
image

No map transform in vision,maybe the closest thing to it is a style customization?
In this case, you could bind a custom property to the fault tag and then use it to drive the style of the component. The expression binding is much easier in this case.

2 Likes