paolo
September 1, 2021, 6:32am
1
Hello,
isn’t it possible to automatically refresh the data from a datasource every x seconds ?
Thanks
1 Like
Nikhil
September 1, 2021, 6:39am
2
@paolo this is not possible yet. We have a feature request for this here.
opened 08:54AM - 28 Jul 21 UTC
Enhancement
Actions Pod
JS
High impact
## Summary
Add a new Timer widget to execute triggers on a certain frequency
…
## Motivation
Currently, it is not possible to run triggers (call queries, functions, APIs) on a schedule. A Timer widget would be very handy. It will help users build auto-updating, real-time internal tools. On a timer event, we can trigger JS bindings.
## Additional Context
Visual Basic (6 and .Net) had a Timer widget which you can drop on the Canvas/form and then set properties. It was very useful to build timers.
![image](https://user-images.githubusercontent.com/800578/127293334-b5c106bc-8ee0-49b6-a74e-349e0ce82b45.png)
![image](https://user-images.githubusercontent.com/800578/127293437-46385313-0603-4ec3-95b0-d37847f70735.png)
![image](https://user-images.githubusercontent.com/800578/127293486-17753bba-18d2-4dee-991b-5d674eb4b0a6.png)
![image](https://user-images.githubusercontent.com/800578/127293512-4cf76c79-2826-4432-a181-e6d72a70e07e.png)
Could you drop a comment with your use case there? It’ll help us get it prioritised
1 Like
If you can host a page somewhere else, you could write a super simple script there with a setInterval() that sends a message to the parent window using postMessage. You can use the appsmith Iframe widget, it has an event that is triggered when a message is received and you can even read the message so you could even have several timers with the same iframe.
Im using this approach to show real time data in an internal dashboard.
3 Likes
Nikhil
October 5, 2021, 7:16pm
4
@Laborin that’s an incredible workaround! We’re introducing setInterval soon
2 Likes
Gavin
November 29, 2022, 2:28pm
5
Hi @Nikhil do you know if this is now possible?
Amelia
November 29, 2022, 4:51pm
6
Hi @Gavin ! Yes, now it is possible to use Intervals .
Here is also a sample app that you can fork to check the code.