Hi all. I’m a confused about how to use a flex repeater to show dynamic data. Let’s say I have 10 rows in a database, and I always have those same 10 rows. Much of the data is static. I can use parameters to pass those into a view in the flex repeater. But there is also data that is dynamic. For example, there’s a quantity field, and the quantity changes fairly frequently, e.g. at least one row updates every second or so. A template repeater in Vision had an update rate, but Perspective only seems to update when refreshed. I can’t figure out how to continuously update the view in the repeater. The only thing I could think of was to create a query tag and use the index in the repeater to point to a location in the dataset of the query tag. But I ran into problems there, too, because I have different screens that would need point to different tags, so I ran into things like toBoolean(lookup({[default]MyQueryTag1},{view.param.Row}, 0, ”MyColumn”, ”IsFull”)), but I need to replace “MyQueryTag1” with a “MyQueryTag{X}”, where I’m not even sure how I’m going to get “X” in there, and I definitely don’t see how to make that tag indirect inside this expression. (If I don’t need an expression, I can use indirect tags, but I’m still not sure where to get “X” from. It’s known on the View that has the repeater, and I suppose I could pass it as a parameter to every instance.) Long story short, how do I have dynamic data for the instances in a flex repeater where the data is coming from a database table? Any help is greatly appreciated.
Is there any chance you can edit your post to introduce paragraph breaks to break up the wall of text and format code blocks as shown in Wiki - how to post code on this forum?
You use an SQL query binding on the root data type of the ‘instances’ and use a script transform to make the returned data form the correct structure in json to produce the right number and composition of instances.
Query bindings have a Polling parameter, which should do pretty much what he asks for.
Sorry about that.
Someone pointed out that query bindings have a “Polling” option, which I completely missed, and is equivalent to the update rate in a Vision template repeater. So problem solved. But somehow I can no longer see that reply so I can’t accept it as the solution. I feel dumb that I didn’t see it; it’s grayed out until you check it, and it’s near the bottom of the section, so I just overlooked it.
I'm the one who posted that, and I can't find that reply either.
Something weird happened...
Your direct reply got deleted by the forum software automatically when a mod deleted the original post.
on delete cascade ![]()
I figured it would be something like that, but that sounds like a bug to me.
Note that only query bindings have that parameter (I think ?).
If you need a polling rate on a script binding, you can call that script in a runScript expression, which also takes a poll rate (which can be set to 0 to run the script just once, and when its parameters change)
You could also have a ‘timer’ custom property with an expression binding that runs now(x) with x being your poll rate in ms. This will make the property update to the current time every x ms.
You can then use that property as the source of another binding, or put a change script on it to execute things on a fixed interval.