web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Block users from acces...
Power Apps
Unanswered

Block users from accessing same screen more than once (sucesfully) on a day

(1) ShareShare
ReportReport
Posted on by 909

Hello,

 

I need a solution for my app.

My users are sending forms daily and I want to prevent them sending it more than once. 

I'd like to make that by blocking button access to the screen if user was already there.

 

Do you guys have any idea?

I tried to make some variable but I have no idea how to reset them at midnight.

Categories:
I have the same question (0)
  • Elitezone Profile Picture
    909 on at

    Anyone?

    Is there any formula to reset variable daily or something like that?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Bonjour,

    Une solution pourrait être de créer une table dans laquelle vous enregistrez le nom d'utilisateur, l'écran, la dernière date d'utilisation.

    Il suffira ensuite de tester la date avec la date du jour pour autoriser ou interdire le bouton correspondant

     

  • Elitezone Profile Picture
    909 on at

    @Anonymous 

    I am using Sharepoint list as a data source.

    You mean I should create a new list, and in patch function save date and name of user that submitted a form.

    Then I make a validation if he made such a thing Today() and if yes block buttons?

     

    I will try to do this, but I'm not really great in Patch() functions.

  • mchrzanowski Profile Picture
    65 on at

    Hello,

     

    In one of my apps I wanted to do similar thing. Easiest way I found was something like that:

     

    -In my menu, I added to onSelect :

    If( IsEmpty( Filter( Status, Created >= Today(), Title = User().FullName ) ), Set( StatusCheck, true ), Set( StatusCheck, false )

    Which basicly checks if given user added a record today ( Status is my sharepoint list DataSource, in Title I store user fullname, but you can use anything, as long as it is unique identifier).

     

    -Then set form and button visibility to StatusCheck, then added label with visiblity !StatusCheck, which informed user that he already provided this info today.

     

    If you need any futher explanation let me now 😉

     

     

  • Elitezone Profile Picture
    909 on at

    @mchrzanowski 

    Seems to be working.

     

    If(IsEmpty( Filter( WhoIsThere, Created >= Today(), 'Email storage'.Email = User().Email ) ),Navigate(Screen5_JobisDone,None),Notify("You cannot do that again!.",NotificationType.Error))

    I changed it to allow to Navigate and show error message.

    Looks good. 

     

    I will have to check tommorow if this works, but the real test would be on 23.59...

    I have a lot of bad experiance with Today().

  • mchrzanowski Profile Picture
    65 on at

    You have to restart app in order to re-set value of Today(), since it's being assigned probably somewhere around launching - this is my observation. Also, if you are using proxy, timezones might not be correct, so it can be different hour than midnight.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard