Good day everyone. As usual, I am counting on your support to quickly solve this little problem.
I have created an app that allows users to post content in a repeating group. However, I do not want a user to have more than one post at a time. A user should be able to post once, until that post is deleted before that user can post again.
I have tried adding a yes or no field “status” to the “post” type, with a default value of NO. This status field will only turn YES after a user has posted.
Then I tried setting the post button to only work when status is NO. But it still doesn’t work.
Also I realized that even if that worked, a user that has previously posted and deleted might have trouble posting again.
Bottom line, how can I limit number of post per user in a repeating group?
Thanks for your help guys.
Hi @ehijiagboneclement I think you should use a count condition, like when the number of posts is greater than 1, then it shouldn’t create a post, else create a post. I hope this might help you.
Thank you at @confluex. I need details on how to implement this. Here’s what I tried. I created a new field status with type number set to 1. and tried to the the following shown in the screenshots. But I am still not getting it. Where do I have to set this count condition?
I don’t know what the ‘Status’ field on your Post datatype is for… but in any case that’s not relevant here…
You just need prevent a User from creating a Post if they’ve already created one…
So you can just add an only when condition on the workflow to stop it running, or better still on the button to make it not clickable.
In either case the condition will be when a search for Posts created by the Current User, returns a count of less than 1.
search for Posts [created by Current User]: count < 1
Thank you @adamhholmes this worked. @confluex you were also right, I just didn’t get the logic properly. Thank you
This topic was automatically closed after 70 days. New replies are no longer allowed.