Forum Academy Marketplace Showcase Pricing Features

Prevent Duplicates when data is nested within the user

Hi, I am creating an activity tracker application for recruiters/headhunter.

In my data I have nested the activity underneath each user.


Screen Shot 2021-12-18 at 10.20.59 PM

While all of the activity is nested under the user e.g.

Screen Shot 2021-12-18 at 10.21.40 PM

I see similar posts for setting the count equal=0 for preventing duplicate entries, but in this case, I want to prevent the User from adding a duplicate day in reference to their own activity.

In other words, multiple duplicate dates in this database are acceptable only if they are entered by different users. How would I go about doing this?

Hi there, @unorigionaldude… if I understand your post correctly, you are trying to prevent a user from creating a new thing in the Activity Data data type if the user has already created a thing in that data type on the current day. If that’s correct, an only when condition on the workflow action that creates the thing in the Activity Data data type should do the trick, and the only when condition would be something like Search for Activity Data:count is 0 with constraints on the search where Created by = Current User and Created date = Current date/time:rounded down to day.

Also, I’m not sure what the User Activity field on the User data type is doing, but I’m guessing the intent might be to store a list of all of a user’s things from the Activity Data data type. If that’s correct, you will need that field to be a list, and it currently is not (note that you will have to delete the field and create a new field that is a list).

Hope this helps.