Hi Experts,
I am trying to make an app with project management capabilities. I want to have 2 types of end users of my PowerApps App: Admin and General.
Admin will have rights to edit the forms and
General will have rights to only view the form
Now my question is, how will a user who logins in into the app will know, which kind of user he is, is there a flow or something can be provided for this? Like in below screen, in this case i have added just a text 'Admin User' , how can i modify it for the type of user login. Suppose if the user who doesn't have edit privileges in the app, i want 'General User' to be written here automatically on login.
Solved! Go to Solution.
Hi IMathur,
Im afraid you asked the question in the wrong board. You should try the PowerApps board for PowerApps questions next time, But i'll still try to help.
Is the app connected to any database? For example, if you are using sharepoint lists, you could create a separate list, which will hold 'Admin names'. Then on the Onstart Property of your app, you could try something like:
Set(currentRole,If(!IsEmpty(Filter(<adminlist>,Email = User().Email)),"Admin","User")
This will filter your list on the current user's email, and return any rows that have that email. If the returned values are not empty (so it found the email) it will set the currentRole variable to Admin.
Then on buttons and labels you can use: If(currentRole = admin,<Your formula for admins>,<Your formula for users>)
Hope this can get you started
Thanks a lot @PVosEska ,
This formula worked using the IsBlank in place if IsEmpty somehow and for the label i put in Label>Text> currentrole and the formula worked and i am able to see the text on the basis of the user in admin list
Hi IMathur,
Im afraid you asked the question in the wrong board. You should try the PowerApps board for PowerApps questions next time, But i'll still try to help.
Is the app connected to any database? For example, if you are using sharepoint lists, you could create a separate list, which will hold 'Admin names'. Then on the Onstart Property of your app, you could try something like:
Set(currentRole,If(!IsEmpty(Filter(<adminlist>,Email = User().Email)),"Admin","User")
This will filter your list on the current user's email, and return any rows that have that email. If the returned values are not empty (so it found the email) it will set the currentRole variable to Admin.
Then on buttons and labels you can use: If(currentRole = admin,<Your formula for admins>,<Your formula for users>)
Hope this can get you started
hi @PVosEska,
Appreciate your response, Thanks a lot!
I tried implementing this formula, for OnStart, Powerapps is accepting the formula with no errors, but when i create the label and put this variable name in text property of label, it is not recognizing the variable, could you please help me with this
Thanks a lot @PVosEska ,
This formula worked using the IsBlank in place if IsEmpty somehow and for the label i put in Label>Text> currentrole and the formula worked and i am able to see the text on the basis of the user in admin list
Sorry for the mix up.
IsBlank() is used to check for a empty value in text or record, IsEmpty() is used for checking if a collection/list/table is empty.
Glad you got it to work, i was on holiday, so i couldn't respond sooner.
Regards,
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
50 | |
18 | |
15 | |
12 | |
12 |
User | Count |
---|---|
60 | |
41 | |
24 | |
20 | |
19 |