Hi, I need a help for my onboarding application I have created an Onboarding application as shown in the below screenshot There are 4 buttons at the left handside 1. New Onboard 2. My Training 3.Intro Connect 4. Process Training When the "New Onboard" is clicked it gives a pop up with a form as shown below Priyasantra_0-1606495205257.png Now my requirement is--> I have a share point list "Access Control" and in this list I have 2 columns:-
1. User (Person/Group column)
2. Roles (Choice)
I want that the Dispalymode.Edit of this button should be true only for the the users those have their roles as "Admin" in the "Access Control list". Which means the users in the list with "Admin" as the role when clicks on the button should get this popup. Anyone apart from the admins should not be able to click this. They should only be able to view this and not edit. Please help me to set this code.
I used to achieve this by using the below formula in the Display mode of the button but the below formula no longer works
With({usrRoles: LookUp('Access Control Admins', User().Email=User().Email, Roles)},
If("Admin" in usrRoles.Value, DisplayMode.Edit, DisplayMode.View)
)
Thanks in advance Regards Priya
Solved! Go to Solution.
Hi@Priyasantra,
Could you please check my formula again, I refer to the Users column in your 'Access Control Admins' list rather than the User() function.
It should be Users.Email = User().Email.
If(
LookUp(
'Access Control Admins',
Users.Email = User().Email, // Please notice this line.
Roles
) = "Admin",
Edit,
View
)
Regards,
Qi
Hi@Priyasantra,
Could you please tell me that if the Users column allows multi select?
If it only allows single select, please try the following formula:
If(
LookUp(
'Access Control Admins',
Users.Email = User().Email,
Roles
) = "Admin",
Edit,
View
)
Regards,
Qi
No the user column is not a multiple selection. And using the above formula gives error. Please see attached
Regards
Priya
Hi@Priyasantra,
Could you please check my formula again, I refer to the Users column in your 'Access Control Admins' list rather than the User() function.
It should be Users.Email = User().Email.
If(
LookUp(
'Access Control Admins',
Users.Email = User().Email, // Please notice this line.
Roles
) = "Admin",
Edit,
View
)
Regards,
Qi
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
190 | |
69 | |
50 | |
38 | |
28 |
User | Count |
---|---|
243 | |
112 | |
91 | |
91 | |
71 |