cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Restrict Access on Sundays

First, I know this is correct but my company will not take on any additional charges right now, even $10/ month for an Azure SQL DB, and this is the only way I know how to update my list.

 

I have a SharePoint list that stores all items my company distributes and I update every Sunday.  Most Sales people aren't using the app on Sundays anyhow but I want to restrict access on Sundays so i can update with no issues.  I have a flow that deletes the list and then repopulates the list with current information.  Sometimes pricing changes, or we have new items added, old items fall off that we no longer sell.  

 

Can I restrict access, or at the very least disable the buttons on Sundays.  I was thinking something like:

 

If(DayOfWeek(Today()) = 1 && User().email <> myHardCodedEmail, disable, edit)

 

on the buttons on the main screen, but i wanted to see if there is a way in the admin portal or anything.

 

My issue is if we sell or promise something that we are no longer ordering because the ranking of an item was discontinued and the salesperson didn't have that updated info.

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Firstly your code will do the job - I assume the hard-coded email is yours. There is no other way that I know of to stop a user logging into the app except go back a step at App OnStart

If(
   DayOfWeek(Today()) = 1 && 
   User().email <> myHardCodedEmail,
   Exit(),
   Navigate(YourScreenName)
)

You can also use Exit(true) and sign them out of Power Apps.

 

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

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Firstly your code will do the job - I assume the hard-coded email is yours. There is no other way that I know of to stop a user logging into the app except go back a step at App OnStart

If(
   DayOfWeek(Today()) = 1 && 
   User().email <> myHardCodedEmail,
   Exit(),
   Navigate(YourScreenName)
)

You can also use Exit(true) and sign them out of Power Apps.

 

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

Anonymous
Not applicable

All these years an I never even thought of clicking on the App label above the screen tree.  Thanks

@Anonymous ,

Now you have taken the journey, that is pretty much the best place to load and collect everything you need.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,481)