Join the Webstudio community

Updated 2 weeks ago

Can I get a dynamic collection based on a number?

I would like to use the "count" of a resource and divide that number. Let's say there are 1.000 items in a resource to divide by 100 to show a list of 10 items.
How would I get a collection to show these 10 items?
B
R
O
11 comments
Your resource doesn't have parameters for this?
Using baserow here. In this case the count is 107.
Would that be possible to do a divide calculation in baserow parameters?
Attachment
image.png
Sure I could do something like ?size=10 to get 10 results, but the data can grow over time, and so would the number.
Do you want to build pagination based on this?
you want a non-fixed amount of results per page, but calculated based on total amount of items?
This is currently not possible with an expression (I really want it to be able to call any js methods too), but also I would question this as a feature request. I have never seen anyone wanting it for reasons
e.g. too few items - bad ux
too many items - bad ux
I'll share a screenrec in private
Add a reply
Sign up and join the conversation on Discord