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 return...
Power Apps
Answered

Search function returning column not valid

(0) ShareShare
ReportReport
Posted on by 18

New to using powerapps and run into the below issue with a simple app.. The app is pulling information from Excel sheet which contains account numbers and details.. The idea is to use it to search specific numbers then see the relevant info. The issue i have is searching the account number... I have the column and it pulls this as it lets me make this the main view and sort by it... However adding to the search function it fails and says it does not exist.

 

I have the below and it works... The moment i add AccountNumber it errors.

 

SortByColumns(Search([@Table1], TextSearchBox1.Text, "CompanyName","Seg_x002f_Non-Seg","Status"), "AccountNumber", If(SortDescending1, Descending, Ascending))

 

So below fails

 

SortByColumns(Search([@Table1], TextSearchBox1.Text, "CompanyName","AccountNumber","Seg_x002f_Non-Seg","Status"), "AccountNumber", If(SortDescending1, Descending, Ascending))

 

I cannot seem to figure out how to make this so i can search Account numbers..> This is the main thing that would be searched.

 

Thanks 

 

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @KBADM

    Search only works for text. To find numbers you need to use Filter() and =, StartsWith(), or the "in" operator. 

    SortByColumns(
     If(
     IsNumeric(
     TextSearchBox1.Text
     ), Filter(
     [@Table1], AccountNumber= Value(TextSearchBox1.Text), 
     Search(
     [@Table1], TextSearchBox1.Text,"CompanyName",
     "Seg_x002f_Non-Seg",
     "Status"
     )
     ), AccountNumber, If(SortDescending1, Descending, Ascending)
    )
  • KBADM Profile Picture
    18 on at

    Thank, that makes sense... However still i get an error 'expected boolean. We expect a boolean (true/false) at this point in the formula.'

     

    Thanks

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @KBADM 

    Could you post a screenshot showing the formula and the error message please?

     

  • KBADM Profile Picture
    18 on at

    @Drrickryp 

     

    Sure screenshot attached.

     

    Thanks

    Screenshot 2023-01-23 100346.png
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, a possibillity is adding a combo-box with for the account numbers. This has a search function.
    Then use a dependent dropdown to show only ComboBox_Name.Selected.Value, This is only if i understood what u are trying to do correctly.

  • KBADM Profile Picture
    18 on at

    @Anonymousi am trying to make it so the users can then search the list by the account number. As this would be the primary search the other info can be used as well but main one is the numbers.

     

    Thanks

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Could u open up the AppChecker and send those errors? Also a monitor session could be helpful.

    DvdH_0-1674474834178.png

     

  • KBADM Profile Picture
    18 on at

    @AnonymousOk so will add in a few batches the errors

    error2.PNG
    error1.PNG
    error3.PNG
  • KBADM Profile Picture
    18 on at

    2nd

    error4.PNG
    error6.PNG
    error5.PNG
  • KBADM Profile Picture
    18 on at

    3rd

    error7.PNG
    error8.PNG

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 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard