cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GreenJaguar
Helper I
Helper I

build combo box from 365Users but filtered by members of a group

Good day,

I built a combo box where the items are option that come from a People / Group column in Sharepoint.  However, it looks to me like these items are basically a query of the whole 365 Users data source.  I want to make sure that the query only matches the group membership, so I want to filter by it.

 

Here is the original items definition for the compo box

Choices([@sharepointlistname].Recipient) where Recipient is a People or Group field type.

 

I know could populated the combo box items with this 

Office365Groups.ListGroupMembers('groupID).value, but the groups connector does not bring over the user photo, which I am leveraging too.

 

so it occurred to me that the combo box could be populated with only those items where Choices([@sharepointlistname].Recipient displayName matches the Office365 group members.

 

Thank you in advance.

4 REPLIES 4
v-jefferni
Community Support
Community Support

Hi @GreenJaguar ,

 

Actually I'm not able to display user photos in Combo boxes Person layout for some time. But if you can, please try and use below formula in Items of the Combo box, at least it will work in a Gallery:

AddColumns(Office365Groups.ListGroupMembers("GroupID").value,"userPhoto",Office365Users.UserPhotoV2(ThisRecord.id))

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

GreenJaguar
Helper I
Helper I

@v-jefferni Thanks, I guess I was not clear enough in my explanation.  I am populating the combo-box from the 365 users connector, but I only want to have the names shown to the user when they match the names of a 365 Group.

Hi @GreenJaguar ,

 

I'm more confused now. "I only want to have the names shown to the user when they match the names of a 365 Group." How will usernames match a group name? If you mean you only want to show the names in a group, list group members will do that as you have already know. My formula will add user photos to the group members table listed by the action.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

GreenJaguar
Helper I
Helper I

@v-jefferni Since the group membership is a subset of the whole organization's user base, I only want the names to appear when they match

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,531)