Hey guys, I need to limit how many times users can perform a determined action during a determined amount of time inside my app, for example, a user only can be able to post in the feed 5 times once a month. What’s the best way to make this limit? Thank you so much!
When a user tries to post you can search your “Wall posts” data type with the following constraints:
User = Current User
Created Date ≥ Current date/time: +(months): -1
Then check: :count < 5
If true, let them post. If false, show a message that they’ve hit their monthly limit.
Hi tarasmuzon,
thank you for your help!
Could you please have a look in my settings and tell me where I’m wrong? This is the workflow for creating a post when the post button is clicked.
Many thanks in advance!
Perhaps you want to add the “only when” condition on the trigger of the workflow so it doesn’t run at all.
Then I’d create a duplicate WF with the opposite condition (count>5) where you can show an alert or some error message.
I came to one simpler solution: when the number of posts is reached, the post button becomes unactive and gets red colour
Looks correct. If it doesn’t work, make sure your Privacy Rules are restricting Do Search For.