cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Time gating my App

I have certain users on my app with Various levels of permissions.

 

I am exploring an option to prevent usage of my App on weekends and After 5pm on weekdays for users.

 

My app has a home page with a button to Navigate to the data in the app.

Im looking to disable this during specified times. Is this possible, if so how could i do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resident Rockstar
Resident Rockstar

Re: Time gating my App

@Christian-Chapp you could use the Weekday and Hour functions to do this.

 

On the DisplayMode of the button that navigates to / shows your data try this:

 

Button1.DisplayMode = if( Weekday( Now()) = 1 || Weekday ( Now()) =7 || Hour( Now()) > 17, DisplayMode.Disabled, DisplayMode.Edit)

 

Note: Weekdays 1 & 7 are the defaults for Sunday and Saturday and the Hour 17 is 5pm (ie 12 + 5) check this link for further info https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-datetime-parts

 

This should work?

View solution in original post

2 REPLIES 2
Highlighted
Resident Rockstar
Resident Rockstar

Re: Time gating my App

@Christian-Chapp you could use the Weekday and Hour functions to do this.

 

On the DisplayMode of the button that navigates to / shows your data try this:

 

Button1.DisplayMode = if( Weekday( Now()) = 1 || Weekday ( Now()) =7 || Hour( Now()) > 17, DisplayMode.Disabled, DisplayMode.Edit)

 

Note: Weekdays 1 & 7 are the defaults for Sunday and Saturday and the Hour 17 is 5pm (ie 12 + 5) check this link for further info https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-datetime-parts

 

This should work?

View solution in original post

Highlighted
New Member

Re: Time gating my App

This Worked Perfectly. Thank you very much.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,346)