cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
laadams
Level: Powered On

Combo Box with Multiple SearchField

I have a combo box that's a Double Layout and I would like it to search within the primary and secondary texts from a SharePoint list. Let's say the Primary Text is "ColumnA" and Secondary Text is "ColumnB" from the SharePoint list. In SearchFields, I tried putting in ["ColumnA", "ColumnB"] but it keeps automatically changing SearchFields to "ComplianceAssetID" which I'm not sure where that came from, I think it's a list property and not an actual column on my list. Is there something wrong with my syntax?

1 ACCEPTED SOLUTION

Accepted Solutions
laadams
Level: Powered On

Re: Combo Box with Multiple SearchField

Thanks Kris! Yeah I'm trying to make my ComboBox to search based on 2 fields in my SP list. I actually figured out what's screwing it up. In my SP list one of my columns is set to a choice rather than single text. Once I changed it to single text, I was able to use both columns to be searched.

 

Good to know that another workaround is to add the list to a collection and then search from that. Thank you!

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Combo Box with Multiple SearchField

HI @laadams ,

Do you want your ComboBox to search based on two fields in your SP list?

 

Based on that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:7.JPG

The GIF screenshot as below:Test.gif

 

Please consider re-add a ComboBox control within your app, then set the Items property to your SP list data source.

Within right Data panel, set the Primary text field to ColumnA, Set the Secondary text to ColumnB. Go to the SearchFields field, type the following formula:

["ColumnA", "ColumnB"]

In additon, please consider save your SP list data source into a Collection firstly, then use the Collection as data source within your ComboBox.

Set the OnStart property of the App control to following:

ClearCollect(RecordsCollection, 'YourSPList')

Set the Items property of the ComboBox to following:

RecordsCollection

then re-configure your ComboBox to search based on your two columns, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
laadams
Level: Powered On

Re: Combo Box with Multiple SearchField

Thanks Kris! Yeah I'm trying to make my ComboBox to search based on 2 fields in my SP list. I actually figured out what's screwing it up. In my SP list one of my columns is set to a choice rather than single text. Once I changed it to single text, I was able to use both columns to be searched.

 

Good to know that another workaround is to add the list to a collection and then search from that. Thank you!

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,446)