Quick question. Does the Data Iterator work with paged queries or can it only display a single result? Probably wasted a couple of hours trying to get it to work with a paged query, should have asked sooner!
The data iterator goes one by one through the records you provided to it. So if your server action returns 10 records the data iterator will see these 10 records.
So it does work with paged queries? Sorry for the dumb question after your answer Teodor. Its just that have tried to load several records to loop through but only a single record is displayed from the paged query? I’m obviously being a pleb here as am sure have done this before…
Yes of course it works with paged queries.
Well have you set up a button with an onclick event to change the current record displayed inside it? The Data Iterator shows ONE record at time - that is what is it used for.
Understood. Wanted to show several records then use a button to show several more. Am sure used to be able to do this with an onClick event on a button loading the next page in the paged result, but for the hell of me can't figure out how to do that now as don't appear to be able to select the next/previous events, from the paged Server Action anymore.
You don’t need data iterator for this… You simply create a repeat region directly from your paged query and then load the next page of your paged query on button click.