+1
Besvaret
Auto-refresh (timed refresh) options?
Looking for some suggestions...What are my options if I want to refresh a screen on a timed or periodic basis? (i.e. auto-refresh every 2 hours).
I have a refresh button on the screen, but I would like to have the screen refresh, from the server, on a timed basis even if you didn't press the refresh button.
This would eliminate the problem of someone not realizing they had new content:
1) if they didn't close and reopen the app or
2) if they didn't press the refresh button
Thanks for your thoughts!
I have a refresh button on the screen, but I would like to have the screen refresh, from the server, on a timed basis even if you didn't press the refresh button.
This would eliminate the problem of someone not realizing they had new content:
1) if they didn't close and reopen the app or
2) if they didn't press the refresh button
Thanks for your thoughts!
Kundesupport af UserEcho
Is your intention to only set a refresh trigger while the app is open, or do you want content to refresh while the app is running in the background?
<wire> <main> <panel name="1" width="100" height="100" background="ff0000" onclickup="move"></panel> </main> <actions> <action name="move"> <sync> <assign property="var:count" value="0"/> <assign property="var:count2" value="0"/> <loop lhs="[var:count]" operator="lte" rhs="5" delay="10"> <loop lhs="[var:count2]" operator="lte" rhs="5"> <alert message="BOOM [var:count] - [var:count2]"/> <assign property="var:count2" value="[eval: [var:count2] + 1]"/> </loop> <assign property="var:count" value="[eval: [var:count] + 1]"/> <assign property="var:count2" value="0"/> </loop> </sync> </action> </actions> </wire>There are probably other ways to do this by putting a delay on a sync block and running a play tag or using a javascript function to poll system time and trigger an action when it meets a certain condition.I was looking through the documentation and hadn't noticed the "onresume" property, before.
P.S. very excited about the tag. I will have to refactor some of my code to take advantage of that. Many new features...Yay!