Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hello everybody!
I have the following interaction scheme:
According to this logic, whenever the value of U in expression becomes greater or less than a certain number, the image becomes either visible or invisible. But it's happening only if I refresh the mashup by clicking "Reload".
I need to do the same using the Autorefresh widget by checking the "AutoRefresh" for real-time updating. Having linked it to the service responsible for changing the U value, which is then passed to the expression, I see that in the grid, after the set interval of autorefreshing, the U value is changing - and the image becomes visible along with it.
But, when the value of U becomes less than the border value and the image should disappear, it doesn't happen. The image keeps hanging until I click "Reload" in the mashup. If I binding the Autorefresh widget to the mashup Refresh-event it's not helping too.
Solved! Go to Solution.
The image does not disappear because the expression defined in the function is not getting evaluated when the value of U changes. You need to enable auto evaluate in the expression function or bind it to an event which would trigger it.
I have attached a test mashup where the button widget disappears if the value entered in text field widget is less than 5. Import it on your instance and let me know if you have any questions.
Have you tried the 'GetProperties' push value from server to client on value update approach yet?
Else in your expression widget, what have you set the 'evaluate' to? Are you triggering the evaluate manually, is it evaluating on value change?
Same thing. And, to be honest, I don't quite understand how to work properly with 'Evaluate'.
The image does not disappear because the expression defined in the function is not getting evaluated when the value of U changes. You need to enable auto evaluate in the expression function or bind it to an event which would trigger it.
I have attached a test mashup where the button widget disappears if the value entered in text field widget is less than 5. Import it on your instance and let me know if you have any questions.
Got it. I forgot to add the line 'output=false' to the expression, which is why the image does not disappear, of course... Thanks!