Skip to main content

Let’s say I have a meeting page which is built on skuid.
The meeting host can stop the meeting clock or pause the meeting clock.
If the meeting status changed. All the opened meeting pages should be reflected for those attendees.
For example, when the timer is paused. The vote or comments component should be hidden or READ-ONLY.

My approach is that I will run a Javascript snippet in the background and keep polling the status via  Salesforce remote actions.
Once the status changed, I will disable/enable some Skuid components.
The thing is any direction to disable or re-query models by polling the status in the background.

Just have no idea how to re-query models or hide components using Javascript within a skuid page.

Any idea or direction?


Poc,

Here is the Skuid API documentation-> https://docs.skuid.com/latest/en/skuid/api/skuid_model.html

You can load (i.e. re-query) a model with something like:


var oppmodel = skuid.model.getModel('OppByProduct');<br>oppmodel.load();

You can show/hide a component by locating its unique identifier and issuing the following:


skuid.$('#sk-PQVRj-123').show();

skuid.$('#sk-PQVRj-123').hide();

Thanks,

Bill


Hi, Bill!
Ideas on querying a model periodically??? Like every 30 seconds? I tried to cobble together some code as inline javascript based on setInterval, but I can’t get it to work.


Raymond,

Zach created a page that queries a model every 10 seconds.  You can find the sample page here->  https://community.skuid.com/t/real-time-dashboards

Thanks,

Bill


Awesome! Thanks, Bill.


Nice explanation! Will try it~~