Join the Webstudio community

Updated last month

Can I get a dynamic collection based on a number?

At a glance

The community member wants to display a list of 10 items from a resource that has 1,000 items, by dividing the total count by 100. They are using a tool called Baserow, where the current count is 107. The community members discuss whether it's possible to do this calculation in Baserow's parameters, and whether building pagination based on the total count would be a better approach. However, the community members conclude that this is currently not possible with Baserow's expression capabilities, and they question the usefulness of this feature request, citing potential user experience issues with too few or too many items per page.

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