I'm trying to run my first PowerApp using the helpdesk template that is in PowerApps. I've pretty much got everything where I want, however I'm having an issue with the Login as admin button.
As i've seen on a couple other posts here the ClearCollect(AdminList) in the "ondemand" section of the app screen is where this is defined. I have defined 2 users in this list, using the same format in the other posts and the instructions that Microsoft has posted, (user's email address), however i still can't get logged in as admin no matter what I try.
I also saw it posted that if i put a label on any page and give it the formula myprofile.mail that would display the format i should be using for this, however when i create a new label and set the text to myprofile.mail and play the app, nothing is displayed.
Does anyone have any tips for a first timer like me on this? I've uploaded a few pictures to help explain it better.
Hi @koechsle ,
Hi @koechsle ,
Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:
Please check if you have typed/specified your email address within the AdminList collection in OnStart property of App control.
If you have already typed/specified your email address within the AdminList collection in OnStart property of App control, please consider modify the formula within the OnSelect property of the "Login as a Help Desk Admin" button to following:
If(Lower(MyProfile.Mail) in Lower(AdminList.Value), Set(isAdmin,true),Set(isAdmin,false)); /* <-- Modify formula here */ If(isAdmin,Navigate(MyTicketsScreen,None),Set(ShowAccessError,true))
then you need to save your app, and re-load it, check if the issue is solved.
Note: If you modify the AdminList collection within the OnStart property of App control, you need to re-fire the OnStart property of your app, otherwise, the modification would not take effect. You could consider click the "Run OnStart" property to re-fire the OnStart property of your app:
Please take a try with above solution, check if the issue is solved.
I've tried your solutions, but i'm still getting the same error message, and not allowed to log in to the app as an admin.
ClearCollect(TaskCategories,"LAPTOP / PC equipment issue","LAPTOP / PC software issue");
ClearCollect(TaskStatus,"NOT STARTED","IN PROGRESS","COMPLETED","DEFERRED","WAITING ON CSR");
ClearCollect(AdminList,"myemailaddress", "another user's email");
I've tried to copy the settings in screenshots for @v-xida-msft 's solutions, but was still unable to fix th issue. Do you have any other words of wisdom?
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.