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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (20,177)