cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ZuzaGlog
Frequent Visitor

Disable a PowerApp in the weekend

Dear Community,

I searched for the answer to my question but could not find a similar issue. 

 

Is it possible to somehow disable my PowerApp only in the weekend? We do not want any staff members do anything in the app in the weekend. 

Thank you! 

1 ACCEPTED SOLUTION

Accepted Solutions
rsaikrishna
Community Champion
Community Champion

@ZuzaGlog 

 

I do not know exact use case of your requirement.

 

Do you want your staff (end users) not using the app to enter/view/edit the data using the app over the weekend?

 

Here is my recommendation:

a. In the app, create a new screen "WeekendScreen" and place a message.

b. On app start, check the current date. if the current date's weekday is Saturday or Sunday, then redirect the user to the new screen "WeekendScreen" by using Navigate function. If not weekend, just redirect the user to your required screen.

 

You can use functions related to date such as Weekday(), Now(), Today() to achieve this.

 

Here is the reference to the functions:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-datetime-parts

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-now-today-istoday

 

If you have further questions, please feel free to post here.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

 

 

View solution in original post

1 REPLY 1
rsaikrishna
Community Champion
Community Champion

@ZuzaGlog 

 

I do not know exact use case of your requirement.

 

Do you want your staff (end users) not using the app to enter/view/edit the data using the app over the weekend?

 

Here is my recommendation:

a. In the app, create a new screen "WeekendScreen" and place a message.

b. On app start, check the current date. if the current date's weekday is Saturday or Sunday, then redirect the user to the new screen "WeekendScreen" by using Navigate function. If not weekend, just redirect the user to your required screen.

 

You can use functions related to date such as Weekday(), Now(), Today() to achieve this.

 

Here is the reference to the functions:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-datetime-parts

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-now-today-istoday

 

If you have further questions, please feel free to post here.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

 

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,082)