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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Unable to Search throu...
Power Apps
Answered

Unable to Search through data set in Gallery - No results

(0) ShareShare
ReportReport
Posted on by 30

Hi all, 

 

Thanks ahead of time for your help. I've been trying to make a very simple app to learn the basics of MPAs, but I cant seem to be able to find a way to search through my data. I've already spent some time searching through other people's posts and despite implementing some changes I still am stuck.

 

As shown in the images attached, I have a search bar as a text input feeding into the Search() command for a Gallery. The current formula in my Items line for the gallery is the following: 

Search(Table3, SearchInput1.Text,"PO Number")
Here, Table3 is the name of the imported table from Excel, and PO Number is the name of the column in the excel Im trying to search through. Later I want to add the ability to search through multiple columns, such as searching by the Plant number or Part Description, as pictured.
 
Any and all advice is appreciated
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    Hi @chrislamb2012 ,

    You might try putting the gallery and the Search box in the same container.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • stum Profile Picture
    104 on at

    Instead of Search function you can use Filter function in Items property of your gallery. This will dynamically filter results in gallery.

     

     

    Filter(
     'Table 3',
     StartsWith(
     'PO Number',
     SearchInput1.Text
     )
    )

     

     

    And for additional columns you can expand the formula like this.

     

    Filter(
     'Table 3',
     StartsWith(
     'PO Number',
     SearchInput1.Text
     ) && CustomerNumber.Value = CustomerNumberDropdown.Selected.Value
    )

     

  • chrislamb2012 Profile Picture
    30 on at

    Hi @stum, Unfortunately this did not change anything, as the search does not reveal any results with Partial or Complete PO Numbers. Is there anything else you'd reccomend?

  • chrislamb2012 Profile Picture
    30 on at

    Hi @WarrenBelz , I've tried your idea but unfortunately landed into a new issue. Now I cannot see the Gallery thats been moved as seen in my attached image. I tried messing around with some things and searching through multiple threads I found on google, but no dice.

     

    EDIT: Scratch that, I was able to figure out the issue, but the search still reveals no results with partial or complete search terms. Any further ideas?

     

    Any suggestions? Thanks for your help

  • stum Profile Picture
    104 on at

    I have a gallery and I use the same logic in gallery's Item property to filter orders as the user type and works without any issues. 

  • chrislamb2012 Profile Picture
    30 on at

    hmm alright, maybe its my excel table then. Ill try reformatting it. Thanks again

  • Verified answer
    WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    Hi @chrislamb2012 ,

    How many records are in your Table - if under 500, try this for a test

    With(
     {_Data: Table3},
     Search(
     _Data,
     SearchInput1.Text,
     "PO Number"
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • chrislamb2012 Profile Picture
    30 on at

    @WarrenBelz That worked perfectly, thank you!

    Would you mind explaining the line a bit?

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    Hi @chrislamb2012 ,

    Excel is a terrible data source where code that should work simply does not and this is yet another example. It clearly did not respond to your query (it should have sent the list back as the query is not Delegable), so I used a With() statement to "do it manually" and load the entire table, then do the query entirely "locally". This will only work on record numbers up to your Data Row Limit (which you can increase to a maximum of 2,000). I suggest you migrate to SharePoint Lists if you have them available.

  • chrislamb2012 Profile Picture
    30 on at

    Hi @WarrenBelz,

     

    Would you be willing to assist me with another issue attached to your Solution?

     

    I am now trying to use a drop-down selection output as an input for the desired search column argument in the Search() function. The Drop Down options are pulling from a column in my dataset with the name "Title Column" which has the names of all my other Columns in it. I'll attach an image of the column incase its format is relevant. I know its not very elegant, but it gets the job done for now while I learn.

     

    I've modified your line of code into the following:

     
    With( {_Data: MnSTable}, Search( _Data, SearchInput1.Text, Dropdown1.SelectedText.Value))
     
    At first I thought this or wrapping the Dropdown1 var in Text() would work, but MPAs keeps stating that argument "Dropdown1.SelectedText.Value" expects a literal so I tried reading around online but found no solutions.
     
    Thanks again for your help yesterday

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard