Perspective Table binding

I have a table in a perspective view where i will be creating some data but asynchronously, which may take time. To ensure the table updates dynamically , I added

Now()

in the data binding and fetched table data using script . Is this correct approach of using

Now()

in the expression binding.?

That will cause the table data to update at the default polling rate, typically 1000 ms.
now() ← Update at the default polling rate.
now(0) ← Evaluate once at loading.
now(1234) ← Evaluate every 1234 ms.

How are you creating the data?

I recommend polling at a rate you need to see the data. If you only update the data ever 10-15 seconds only poll every 10,000ms.

I like to optimistically poll data meaning if It is going to happen in the next 15 seconds I will want to poll twice possibly in that 15 seconds (7s) to make it feel more realtime, but that may not work for all situations.

How are you creating data?
Inserting it to database and there are other process which takes time and it's not single data insertion, in a single fetch inserting more than 100 data.

Does your script not know when the data insert is finished? If it does, then use a message handler at that time to refresh the data binding. That way it becomes event based and not timer based.


Tips:
Discourse editor

Use the Blockquote button to quote somebody else.
Use the Preformatted Text button to format code (such as now() in your original post).

See Wiki - how to post code on this forum for more.

1 Like