Forum Documentation Showcase Pricing Learn more

How to create a list with an upper limit on number of items?

I want to create a list of images (called “Photo list”) containing only at most 3 images. How? Thanks.

Put a condition on the thing that adds to your list, such that it becomes unclickable when the count of your list is 3.

Maybe if you can tell us what you mean by “a list of images”. Do you mean in a repeating group ? Or on a database ?

Hi, thanks for your reply. I meant creating a list (of images) to have at most 3 images, in the database.

So, either add a constraint to the workflow that adds the images. So “and when…” and count your things (you will need the :count function here) and either < or > 3. So do something different if > 3.

Or… put a condition on the action that adds the images. So say you have a button that does the add. use the same “:count” above to make the button unclickable if there are 3 there already.

What you can’t do is make the database only accept 3 images. Bubble doesn’t work like that, you need to create the constraints yourself.

2 Likes

Thanks for your clear explanation, I understand fully now. Have a nice day!

1 Like