I'm trying to display on a label a certain value depending on which tag provider you choose in a dropdown menu. It only updates the value once when you first choose the provider from the dropdown.
I've tried every variation of this...
EXPRESSION BINDING:
"Value: " + tag({../Dropdown.props.value} + "pathToValue")
DIRECT BINDING:
[siteProvider]pathToValue
A direct binding to the tag works and updates live on the screen but obviously defeats the whole purpose of what I'm trying to do by choosing your site.
I've tried everything from Map transforms to indirect tag bindings and nothing works properly. The tag value I'm wanting to display changes every second so I don't see why the expression doesn't update alongside it.
Your expression evaluation will be triggered by a change in Dropdown.props.value
. That's what the expression is monitoring.
So what would be the solution to make sure that the expression binding executes consistently and displays the latest value from the tag?
I tested it on my project and was able to get it to work using an indirect tag binding. It seems to be updating correctly. Sounds like you may have already tried this setup though?
1 Like
Yes I just tried that exact setup and it doesn't work unfortunately. It only evaluates the first time the option is chosen from the dropdown. Even when selecting a different dropdown option (aka site) then going back it still keeps the initial value. Would it matter that this value is inside a UDT? I figured out despite it working in another reference... the {../Dropdown.props.value} evaluates to "null" insite the indirect tag binding because even after selecting it and clicking apply and save the expression field stays empty.
Being inside a UDT shouldn't break it to my knowledge. So the value property of the dropdown is null? do the value and label options look ok?
Trying to change the reference in the indirect tag binding doesn't work at all. Its 100% a bug so I've called ignition support and will update this thread when I figure out the problem.
1 Like
Did you get anywhere with this? Interestingly enough I have just run into a similar problem. I have 2 numeric entry fields and depending on a param, I want a custom property to bind to the value of the corresponding numeric entry. Can not for the life of me get it to update the custom property...
You can use an expression binding of this sort:
if({this.custom.selection_param} = 'something',
{./NumericEntryField.props.value},
{./NumericEntryField_0.props.value}
)