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 / Complex combobox search
Power Apps
Answered

Complex combobox search

(0) ShareShare
ReportReport
Posted on by 11

I'm attempting to build a search feature in a combobox in a PowerApps canvas app where there can be >17 billion permutations from multiple columns of choices.  

 

For example:

 

ItemIDcol01col02col03col04
Item1a,b,c1,2,3,4,5cd,g1,h5 
Item2w,x,y,zab,bd14,16,18,20c,d,e
etc    

 

Is there a way to set up a search where a user can start typing "bd16" and Item2 would be returned without creating a collection of all 17 billion+ possible permutations, maybe with MatchAll?  

 

Thanks in advance!

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @nyyanks1013 

    You can use the Search function and/or the in operator, but these will not be delegable.  So you need to first determine if your datasource record totals will exceed the maximum record limit of PowerApps.

    If so, they you will encounter issues with getting accurate results.

     

    I hope this is helpful for you.

  • Verified answer
    nyyanks1013 Profile Picture
    11 on at

    Figured out a solution (takes a few steps):

    - Added a hidden slider with default = Len(ComboBox.SearchText)

    -In OnChange of slider, create temporary collection with a concatenated list of potential matches, then add those to the ComboBox data source/collection with concat function by item#

    -Include added column in search field of combobox

     

    Slider OnChange:

     

    Clear(tempMatches);
    ClearCollect(tempTable,AddColumns(DataSource,"Matches",
     With({ 
    
    a:ForAll(Split(Concat(Filter(Split(ThisRecord.'col01',","),Find(Lower(Result),Lower(ComboBox1.SearchText))>0).Result,Result,","),","),Result), 
    
    b:ForAll(Split(Concat(Filter(Split(ThisRecord.'col02',","),Find(Lower(Result),Lower(ComboBox1.SearchText))>0).Result,Result,","),","),Result), 
    
    c:ForAll(Split(Concat(Filter(Split(ThisRecord.'col03',","),Find(Lower(Result),Lower(ComboBox1.SearchText))>0).Result,Result,","),","),Result), 
    
    d:ForAll(Split(Concat(Filter(Split(ThisRecord.'col04',","),Find(Lower(Result),Lower(ComboBox1.SearchText))>0).Result,Result,","),","),Result))
     },
     ForAll(Sequence(CountRows(a)) As A,
     ForAll(Sequence(CountRows(b)) As B,
     ForAll(Sequence(CountRows(c)) As C,
     ForAll(Sequence(CountRows(d)) As D,
     Collect(tempMatches,{ItemID:ID1,Matches:Concatenate(
     Last(FirstN(a,A.Value).Value).Value,
     Last(FirstN(b,B.Value).Value).Value,
     Last(FirstN(c,C.Value).Value).Value,
     Last(FirstN(d,D.Value).Value).Value)})
     )
     )
     )
     )
     )
    ));
    
    ClearCollect(DataSource2,AddColumns(ShowColumns(DataSource,"ID1"),"Matches",Concat(Filter(tempMatches,ItemID=ID1).Matches,Matches,",")));

     

     

     This only works for a specified number of columns, but that's acceptable for my purposes.  Would welcome any suggestions/comments if there's other methods to accomplish the dynamic search.

  • Rivius Profile Picture
    269 on at

    Thanks! I was having difficulty finding a way to search through multiple data sources and update dynamically as the user typed in the search box.  Using the slider trick let me update the collection while the user types in the search box! 

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard