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 III
Super User III

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 III
Super User III

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,226)