How can i get the ""Items per page"" variable of a repeater?

Is there [[item.???]] to use? I didn’t find anything in the axure documentation.

image

It’s an old thread but it should still be accurate: Repeater/Dataset Documentation (API, Item, TargetItem, Variables)

1 Like

@huban posted a good thread there–lots of good information about repeaters. It also shows a great way to see all the available variables and parameters you can use in an equation. In your case, all the repeater’s built in variables.

Here’s a screenshot showing where you can find this, in the “Edit Value” dialog after you click the little “fx” button:

If you scroll down under “Repeater / Dataset” the variable you want is visibleItemCount as in, [[item.visibleItemCount]] which will return the number of items/rows which are visible. When you have pagination, the visible items are the “items per page”. Note this value would change on the last page of your repeater if you have less than a full page to show (the number of columns is not evenly divisible by the “items per page” value you set in the repeater’s style.) For example, if you have a repeater with 5 items per page and 13 rows, page 1 would have 5 items, page 2 would have 5 items and page 3 would have 3 items, so when page 1 is shown, visibleItemCount = 5, and when page 3 is shown, visibleItemCount = 3.