Hi all,
Can we able to display Gallery Items based on the user groups ? (For example: There are 15 items in gallery, can GroupA users see only 5 items , Group B users see other 5 items and Group C can see all the 15 items) There are posts related for hiding/showing the button for different user groups. I am trying the same scenario with the gallery items in power apps canvas
Thanks in advance!
Solved! Go to Solution.
Hi @Nikhil_01 :
Could you tell me:
If so,you can get the groups of the current user through the following formula (a table consisting of group names with only one column)
Office365Groups.ListOwnedGroupsV3().value.displayName
Note:You need to add an Office365Groups connectior.
So,the Items Property of the Gallery should be:
If(
"GroupC" in Office365Groups.ListOwnedGroupsV3().value.displayName,
Filter(XXXXXXX),
"GroupB" in Office365Groups.ListOwnedGroupsV3().value.displayName,
Filter(XXXXXXX),
"GroupA" in Office365Groups.ListOwnedGroupsV3().value.displayName,
Filter(XXXXXXX)
)
Best Regards,
Bof
Hello @Nikhil_01
I've achieved this by creating a "RoleDefs" table for all the users to put them into the groups. On start, collect the "RoleDefs" table, Set(currentUserRole, Filter(RoleDefs, EMAIL = User().EMAIL).GROUP) then add a filter to the gallery where that group is equal to the "currentUserRole" group.
Hi @Nikhil_01 :
Could you tell me:
If so,you can get the groups of the current user through the following formula (a table consisting of group names with only one column)
Office365Groups.ListOwnedGroupsV3().value.displayName
Note:You need to add an Office365Groups connectior.
So,the Items Property of the Gallery should be:
If(
"GroupC" in Office365Groups.ListOwnedGroupsV3().value.displayName,
Filter(XXXXXXX),
"GroupB" in Office365Groups.ListOwnedGroupsV3().value.displayName,
Filter(XXXXXXX),
"GroupA" in Office365Groups.ListOwnedGroupsV3().value.displayName,
Filter(XXXXXXX)
)
Best Regards,
Bof
User | Count |
---|---|
256 | |
110 | |
90 | |
51 | |
44 |