web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Admin screen to set pr...
Power Apps
Answered

Admin screen to set properties

(0) ShareShare
ReportReport
Posted on by 32

Hi there - I created an app that is used for a week each month, the time that it is not available, I move a screen to the top of the order that just says something like "sorry this is closed." I am trying to figure out if there is a good way to create an admin screen that can turn the app on and off or make things visible/not visible for a specific date range. We want multiple people to be able to act as an "admin" and control the app. 

 

Do I need to create something in SharePoint that admins can update to turn things on/off, etc? 

 

Thanks for any insights!

Categories:
I have the same question (0)
  • mmollet Profile Picture
    3,187 on at

    You can use those user's email address to let them into the app to a 'hidden' admin screen. 

    If(User().Email = "oneuser@email.com" Or User().Email = "twouser@email.com", Navigate(adminScreen), Navigate(userScreen))

    If you want this to be disabled for certain days of the month then just make a label to cover the screen, add the text you want, and then use If(Day(Today()) >7 And Day(Today()) < 15, true, false) If that is on the visable property then it will only show up on the 8th throught the 14th for one week. You could swap the true and false and make it be it be invisible for that week instead if you wanted etc.

  • aking11 Profile Picture
    32 on at

    This looks like it would work at first glance! Could I create some type of date picker function on the admin screen and have the visible property look at the selected dates on the admin screen? Or maybe it is just a text field they type "open" or "closed" and the label visible property looks at that? Thanks for the quick help!!

  • Verified answer
    mmollet Profile Picture
    3,187 on at

    So are you trying to make it where the selected dates on the admin screen for say start and end are the dates where the app opens for users and then closes again. So app is availiable from start date to end date and both of those are set on the admin page? For that you would for sure need to store those values in a SP list or something. That is only needed b/c the app will have to fetch that data after it is closed then reopened.

     

    // here is an example of how to pull that data from SP back to the app when it loads.

    AdminScreen.OnVisible -> UpdateContext({SPListData: LookUp(YourListName, ID = 1)})

    StartDatePicker.DefaultDate -> SPListData.StartDate

    EndDatePicker.DefaultDate -> SPListData.EndDate

     

    // Now if the admin wants to change those you will have to patch to that item again to save the changes:

    Patch(SPListData, LookUp(SPListData, ID =1), {StartDate: DatePickerStart.SelectedDate, EndDate: DatePickerEnd.SelectedDate})

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard