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 / Search function throws...
Power Apps
Unanswered

Search function throws error

(0) ShareShare
ReportReport
Posted on by 66

I was following the steps in this video while trying to create a SearchBox to look for an input in two fields "ProjectID" and "Project Name" but I am getting an error that I cannot figure out what it means.

 

Also, the Source is a Sharepoint List with only 161 items and both of the fields to be searched are set to be "Single Line of Text".

 

Thank you in advance for your help.

jagostinho_CT_0-1602253299923.png

 

Categories:
I have the same question (0)
  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    Hi @jagostinho_CT 

    Looking at your screenshot, you appear to have named your search text box Search.

    This name would conflict with the Search function. If you rename the text box to something like txtSearch, that should solve the problem.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @jagostinho_CT 

    Your ProjectID is most likely a numeric column, not a text column.

     

    Search only works on text columns.

    You can work around this with the following change to your formula:

    Search(
     AddColumns(ProjectsInfoDB, "projectIDtxt", Text(ProjectID)), 
     Search.Text, 
     "projectIDtxt", "ProjectName"
    )

     

    I hope this is helpful for you.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @jagostinho_CT 

    And what @timl mentioned also...

  • jagostinho_CT Profile Picture
    66 on at

    Thank you for the quick replies.

     

    The "ProjectID" field type is Text as all the ProjectIDs contain a mix of numbers and letters such as A123ABC or 999NNN

     

    The code below is still producing a similar error.

    Search(AddColumns(ProjectsInfoDB,"ProjectIDtxt",Text("ProjectID")),txtSearch_1.Text,"ProjectIDtxt","ProjectName")

    jagostinho_CT_0-1602255991712.png

     

    And rather than a Yellow sign warning is not displaying a Red sign one. 😞

     

    jagostinho_CT_1-1602256085173.pngjagostinho_CT_2-1602256104958.png

     

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @jagostinho_CT 

    So if the columns you are searching are all text, then you need not adjust the formula to add the column as I suggested.

    The core reason was as @timl mentioned with the naming.

    Your formula should be the following:

    Search(ProjectsInfoDB, 
     txtSearch_1.Text,
     "ProjectIDtxt","ProjectName"
    )

     

    You are putting this formula in the Items property of your Gallery...correct?

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    Hi @jagostinho_CT 

    Just to confirm, if you don't call AddColumns, do you still receive the same error?

    Search(ProjectsInfoDB,
     txtSearch_1.Text,
     "ProjectID"
     "ProjectName"
    )
    

     

  • jagostinho_CT Profile Picture
    66 on at

    Not same, different.

    I am thinking because I then need to include "ProjectsInfoDB"?

    Search(ProjectsInfoDB,txtSearch_1.Text,"ProjectID","ProjectName")

    Which is still throwing an error, though a yellow sign error. The suggested fixes are

    1. decrease the number of items. but these are already below 500 items

    2. simplify the formula. how to do it? It looks to me that the formula is already very basic

    3. Change data source location. I would really like to keep it where it is. Is this really the reason why it is breaking?

     

    jagostinho_CT_1-1602257437763.png

     

     

    jagostinho_CT_0-1602257350423.png

     

  • jagostinho_CT Profile Picture
    66 on at

    Not sure what you mean by

    You are putting this formula in the Items property of your Gallery...correct?

     I am typing in in the Text Input box.

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    @jagostinho_CT 

    What @RandyHayes is asking is - are you entering this formula into the Items property of your gallery control?

     

    timl_0-1602257921508.png

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @jagostinho_CT 

    This should be in the Items property of your Gallery.

    Putting this in a text property is going to give you an error.

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard