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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,604)