cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

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

Re: Restrict Access on Sundays

Hi @rmanthey99 ,

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

Re: Restrict Access on Sundays

Hi @rmanthey99 ,

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

Highlighted
Resolver I
Resolver I

Re: Restrict Access on Sundays

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

Highlighted
Super User III
Super User III

Re: Restrict Access on Sundays

@rmanthey99 ,

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,236)