Hi, I am trying to create a powerapp to help manage access permission to a sharepoint. The way it's been setup is as follows:
- each item has an "access level" value eg . A< B < C.
- I have 3 lists that document the names of people that have access to A, B and C. so lets name them level A, level B, level C
- permission on the main list are set through a flow which checks the access level value and then writes permissions based on names in the corresponding access lists.
I would like to create a powerapp that helps me to manage access easier. I want the app to look-up a name and then add the names to the corresponding list Eg.
Name box
list A -> check
list B -> check
List C -> check
So if i want that name to have access to list A and B, I click the check next to both. Is that possible or is there a work-around? Thanks!
Solved! Go to Solution.
Hi @bh4 :
Do you want to add the people selected by the user to multiple SharePoint lists through checkbox?
The key is to use the OnCheck property of checkbox to perform the add event.
I'v made a test for your reference:
My date sources(Level A/Level B/Level C😞
Column (click to edit) Type
Title | Single line of text |
User | Person or Group(do not allow multiple selections) |
1\add a combobox control(ComboBox1)
Items:
Choices('level A'.User)
2\add three checkbox controls
CheckboxA
Default(Check if the user already has A permission, if it is the default value is true)
If(IsBlank(LookUp('level A',ComboBox1.Selected.Claims=User.Claims)),false,true)
OnCheck(OnCheck event: add user to level A list)
If(IsBlank(LookUp('level A',ComboBox1.Selected.Claims=User.Claims)),Patch('level A',Defaults('level A'),{Title:"A",User:ComboBox1.Selected}))
OnUncheck(OnUncheck event: remove user from level A list)
RemoveIf('level A',ComboBox1.Selected.Claims=User.Claims)
CheckboxB
Default
If(IsBlank(LookUp('level B',ComboBox1.Selected.Claims=User.Claims)),false,true)
OnCheck
If(IsBlank(LookUp('level B',ComboBox1.Selected.Claims=User.Claims)),Patch('level B',Defaults('level B'),{Title:"B",User:ComboBox1.Selected}))
OnUncheck
RemoveIf('level B',ComboBox1.Selected.Claims=User.Claims)
……
Best Regards,
Bof
Hi @bh4 :
Do you want to add the people selected by the user to multiple SharePoint lists through checkbox?
The key is to use the OnCheck property of checkbox to perform the add event.
I'v made a test for your reference:
My date sources(Level A/Level B/Level C😞
Column (click to edit) Type
Title | Single line of text |
User | Person or Group(do not allow multiple selections) |
1\add a combobox control(ComboBox1)
Items:
Choices('level A'.User)
2\add three checkbox controls
CheckboxA
Default(Check if the user already has A permission, if it is the default value is true)
If(IsBlank(LookUp('level A',ComboBox1.Selected.Claims=User.Claims)),false,true)
OnCheck(OnCheck event: add user to level A list)
If(IsBlank(LookUp('level A',ComboBox1.Selected.Claims=User.Claims)),Patch('level A',Defaults('level A'),{Title:"A",User:ComboBox1.Selected}))
OnUncheck(OnUncheck event: remove user from level A list)
RemoveIf('level A',ComboBox1.Selected.Claims=User.Claims)
CheckboxB
Default
If(IsBlank(LookUp('level B',ComboBox1.Selected.Claims=User.Claims)),false,true)
OnCheck
If(IsBlank(LookUp('level B',ComboBox1.Selected.Claims=User.Claims)),Patch('level B',Defaults('level B'),{Title:"B",User:ComboBox1.Selected}))
OnUncheck
RemoveIf('level B',ComboBox1.Selected.Claims=User.Claims)
……
Best Regards,
Bof
Thanks for explaining clearly. That worked.
Only issue now is the annoying auto zoom when using the combo box on IPhone . It distorts the view and I can’t seem to un-zoom after selecting an user
User | Count |
---|---|
228 | |
103 | |
96 | |
57 | |
31 |
User | Count |
---|---|
283 | |
113 | |
107 | |
63 | |
62 |