Limit X Data Type Creation Every X Hours

Hey all,

I’ve got a data type called “Post” where users can create a Tweet-style post, however this could be done over and over without any limits.

To avoid potential spamming, I’m wondering how I could go about limiting posts per day or per hour?

I imagine on the User data type I could put a field called “Posts Today” as a number. When a post is created, we +1 to that data field so it increases every post, and I know how I could stop the workflow of the current users posts = 10 for example.

What I’m not sure on is how to reset that Posts Today back to 0 after a certain time has passed since the last post. Perhaps it could work if I reset all users Posts Today at 4AM each day?

Hello @trvshowell

  • On page load count the current user “today posts”
  • Place a condition on the create post button to be clickable only if “todays posts” count is < 10
1 Like

Thanks! How would I reset todays posts to 0? Is there a way to do that every 24 hrs?

Hi there, @trvshowell… if I understand your post correctly, you don’t necessarily need to keep/reset a count because the following condition on the Create Post button should do the trick.

Anyway, that’s just one way to go, and I hope this helps.

Best…
Mike

1 Like

You’re my hero Mike.

1 Like