How to limit the numbers of things per user?


Hi everyone, I have a little problem. I create a digital menu for restaurant with a limit of 3 per user. How can I make to add the limit in my database and avoid user create more than 3 restaurant ?

Thank you very much !


Bonjour, voilà je crée un système de menu digital pour restaurants et j’aimerais limiter à 3 établissements par utilisateur. Comment puis-je déterminer la limite dans ma base de donnée et empêcher les utilisateurs de créer plus que 3 ?

Merci beazcoup !

Hey @devrimdmk ,

Absolutely. Just add conditionals to the UI component and adjust the workflow.

You can also use states to make it easier if you don’t need to save it to the database.

For example:
Create a state: menu count (type number)
Set default value to 0

Every time the current user adds one more menu/dish insert in the workflow: set state - menu count plus +1.

On the UI, it’s it is for example a button, add a condition like when “menu count” is = 3

  • this element is not visible or this element is not clickable.

** also worth mention, if the user can remove a selection, add to the correspondent workflow: set state - menu count plus -1

Thank you very much ! You’ve solved my ‘problem’

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.