web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Combo Box with Multipl...
Power Apps
Answered

Combo Box with Multiple SearchField

(0) ShareShare
ReportReport
Posted on by 11

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?

Categories:
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    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,

  • Verified answer
    laadams Profile Picture
    11 on at

    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!

  • MaciejB Profile Picture
    11 on at

    Hi, I just did this to make it work :

     

    WRONG : In the searchfields I tried : ["Field1" ; "Field2"] (or ["Field1" , "Field2"] in US)

    But actually you have to use "&" to separate your field ! Just like this :

     

    ["Field1" & "Field2"]

     

    I hope my answer will help you !

     

    _____________________________________________________

    Edit : It did not work very long (why did it stopped working?)

    So here's how I did it:

     

    I added a column in sharepoint, and made a concatenation of each column.

    My search field is the last column which contains every field (Yes this solution is ugly, but it works for me ^^).

  • NBMS_2019 Profile Picture
    59 on at

    I have a SharePoint List Look-up field or a ComboBox that I need the result to 

     

    Doe, Jihn

    Doet, Jane

    ManDoeman, Kathy

    Loop, Doe

    all names with Doe whether it is a first or last name

     

    Right now,  it is just showing

    Doe, Jihn

    Doet, Jane

    ManDoeman, Kathy

     

    It is ignoring people with first name Doe.

     

    Thanks 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    How do you avoid the Power Apps from keeping changing the SearchField?
    Every time I made any change in my screen or another PowerApps change it automatically with no warnings.

  • IchBinDerTim Profile Picture
    3 on at

    Hi MaciejB, this solution does help, but I have to readjust the form every 1-2 weeks because the search field content resets. Any ideas on how to do this?

  • ClemRoi24 Profile Picture
    2 on at

    Hi IchBinDerTim & ederfdias, i got the same issue, after some reseach i think the defaultSelectedItems parameter is the cause !! it doesn't reset if it's empty 😉 i'm still tryin to figure it out how to escape this bug ... if someone got a solution i'm intersetd in

  • nikk_diamond Profile Picture
    14 on at

    Another workaround is to use AddColumns() function in your table/collection in PowerApps, concatenating both columns and search over the new resulted column.

  • iagorah Profile Picture
    22 on at

    Thats a good solution. Works for me!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard