cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

A problem with autorefreshing

Mr_Henry_M
14-Alexandrite

A problem with autorefreshing

Hello everybody!

 

I have the following interaction scheme:

 

Scheme.png

 

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.

ACCEPTED SOLUTION

Accepted Solutions

@Mr_Henry_M 

 

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.

View solution in original post

4 REPLIES 4
PaiChung
22-Sapphire I
(To:Mr_Henry_M)

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?

Mr_Henry_M
14-Alexandrite
(To:PaiChung)

Same thing. And, to be honest, I don't quite understand how to work properly with 'Evaluate'.

 

Scheme_2.png

 

@Mr_Henry_M 

 

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.

Mr_Henry_M
14-Alexandrite
(To:SachinSharma)

Got it. I forgot to add the line 'output=false' to the expression, which is why the image does not disappear, of course... Thanks!

Announcements


Top Tags