cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Zaneeee12
Regular Visitor

Combobox Users from Sharepoint List

I have a Combobox that I want to get a list of users into.  The users are in a Sharepoint List, in a 'People or Group' field.

 

In my case they are Credit Card Approvers.

 

Zaneeee12_0-1617835271008.png

 

 

Zaneeee12_1-1617835294552.png

 

 

 

But when I run the app, and click the drop down, nothing drops down.  I also cant type in to search.

 

(I tried to copy this - Solved: Combo Box populated with values from user list in ... - Power Platform Community (microsoft.... )

 

Any ideas please?

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Zaneeee12 ,

 

Now, I know your needs. 

Please try this formula on Items property of combo box control:

AddColumns(LIST106.Test,"aa",Test.DisplayName)

// LIST106 is the list name. 'Test' is a Person column. 

v-xiaochen-msft_0-1617931479519.png

v-xiaochen-msft_1-1617931490285.png

v-xiaochen-msft_2-1617931507267.png

v-xiaochen-msft_3-1617931516649.png

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

View solution in original post

7 REPLIES 7
v-xiaochen-msft
Community Support
Community Support

Hi @Zaneeee12 ,

 

If you want to use the search function of combo box control, please set the IsSearchable property to true.

v-xiaochen-msft_0-1617850487563.png

v-xiaochen-msft_2-1617850576473.png

 

// Test is a 'People or Group' column.

 

It should be noted that this method can only search but not open the drop-down list.

 

If you want to expand the drop-down list and search for users, I will suggest you another method.

(Use Office365Users connector)

 

1\ Add a combo box control and set its Items property to:

 

Office365Users.SearchUser({searchTerm:"",top:500})

 

 

2\ Set the combo box control's IsSearchable property to:

 

true

 

v-xiaochen-msft_3-1617850913559.png

 

If you use an edit form and use SubmitForm() function to submit data, you could use this formula on Update property of your person datacard.

 

{Claims:"i:0#.f|membership|"&DataCardValue2.Selected.Mail,Email:DataCardValue2.Selected.Mail,Department:"",DisplayName:"",JobTitle:"",Picture:""}

 

// DataCardValue2 is the name of my combo box control.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

Zaneeee12
Regular Visitor

Thanks for this @v-xiaochen-msft   I tried the top option, but it gave me a list of all users, not just those users in that column already.  Is there a way to limit it?

 

The bottom option looks like its designed to give me all users, which is not what I am after.  So i did not try that.

Hi

 

You could create an Office365group and add the users. In the inverted commas you need to add the group ID

indhaa_1-1617910459856.png

 

 

Zaneeee12
Regular Visitor

thanks @indhaa , I am looking to use a more user controlled/dynamic list from sharepoint.   Does this mean its not possible to filter a list of users from a list in sharepoint?

v-xiaochen-msft
Community Support
Community Support

Hi @Zaneeee12 ,

 

Now, I know your needs. 

Please try this formula on Items property of combo box control:

AddColumns(LIST106.Test,"aa",Test.DisplayName)

// LIST106 is the list name. 'Test' is a Person column. 

v-xiaochen-msft_0-1617931479519.png

v-xiaochen-msft_1-1617931490285.png

v-xiaochen-msft_2-1617931507267.png

v-xiaochen-msft_3-1617931516649.png

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

I think you can prompt the user from SharePoint People/group group but i haven't used it in my app.
I use office365group because it is easier for me to manage the access from AD. 

I have to test it too

 

 

This worked great thank you @v-xiaochen-msft .  Perfect.

 

To expand on this, is it possible to add two columns then add them to a collection ?

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (1,514)