cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tonysommer
Helper II
Helper II

Only allow users one choice per user per day

I have a calendar gallery and a form that has 4 choices. I only want those 4 choices to be selected one time each day. How can I restrict users from being able to make more choices than the four presented?

 

For instance User A can choose 1-4, and if User A selects choice 1, then User B cannot select choice 1 for a full day. Is that possible or do you have any insight on how to restrict users in that way?

 

My thought is to disable the submit form button unless a user selects a choice that has not been selected for that day.

 

Added screen shot to help with troubleshoot.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @tonysommer ,

Updated a bit below - I was showing you the syntax for testing that something in your list had not been done today

If(
   CountRows(
      Filter(
         YourList,
         YourActivityName = "The one tested" &&
         DateDiff(
            YourDate,
            Today(),
            Days
         )=0
      )>0
   ),
   Notify("You cannot select another one",NotificationType.Error),
   Whatever you do now
)

You would have to test the four.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @tonysommer ,

Do a CountRows on a filtered list based on your data with the date in it. So using YourList and YourDate

If(
   CountRows(
      Filter(
         YourList,
         DateDiff(
            YourDate,
            Today(),
            Days
         )=0
      )>0
   ),
   Notify("You cannot select another one",NotificationType.Error),
   Whatever you do now
)
    

 - please watch commas/brackets as I free-typed it. 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

I'm not exactly sure I understand completely. Does this allow the notification to happen if somebody chooses a license that has already been chosen? Any way you can elaborate on what this would do?

Hi @tonysommer ,

Updated a bit below - I was showing you the syntax for testing that something in your list had not been done today

If(
   CountRows(
      Filter(
         YourList,
         YourActivityName = "The one tested" &&
         DateDiff(
            YourDate,
            Today(),
            Days
         )=0
      )>0
   ),
   Notify("You cannot select another one",NotificationType.Error),
   Whatever you do now
)

You would have to test the four.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @tonysommer ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Sorry yes, this has helped steer me in the right direction. Work has been crazy and haven't been able to get to it until today.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,412)