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 sharepoint columns
Power Apps
Answered

Search sharepoint columns

(0) ShareShare
ReportReport
Posted on by 47

Hi 

 

 i have a couple columns that i need have serchable

 

code today:

SortByColumns(Filter(Helpdesk; StartsWith(Title; TextSearchBox1.Text)); "ID";
TextSearchBox1.Text)); "Status"; " "column1" "column2" "column3"
If(SortDescending1; Descending; Ascending))

 

 but this doen t work  iget a red cross 

 

Regards

Tommy

 

Categories:
I have the same question (0)
  • Verified answer
    CarlosFigueira Profile Picture
    Microsoft Employee on at

    If you want to search through all of those columns, you can use the following expression:

    SortByColumns(
     Filter(
     Helpdesk;
     StartsWith(Title; TextSearchBox1.Text) Or
     StartsWith(ID"; TextSearchBox1.Text) Or
     StartsWith(Status; TextSearchBox1.Text) Or
     StartsWith(column1; TextSearchBox1.Text) Or
     StartsWith(column2; TextSearchBox1.Text) Or
     StartsWith(column3; TextSearchBox1.Text));
     "ID";
     If(SortDescending1; Descending; Ascending))

    This will filter based on the text search box for any of the given columns, and the result of the filter will be sorted (in this case, based on the "ID" column, but you can change it to another column.

  • tommyrihu Profile Picture
    47 on at

     Hi CarlosFigueira

    thanks for you help but seems i get an red  cross here with tihs

     

    SortByColumns(

        Filter(

            Helpdesk;

            StartsWith(Title; TextSearchBox1.Text) Or

            StartsWith(ID; TextSearchBox1.Text) Or

            StartsWith(Status; TextSearchBox1.Text) Or

            StartsWith(Butiksnamn; TextSearchBox1.Text) Or

            StartsWith(Kontorsdator; TextSearchBox1.Text) Or

            StartsWith(Skrivare; TextSearchBox1.Text));

        "ID";

        If(SortDescending1; Descending; Ascending)

     

    best regards

    Tommy

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi Tommy,

    Are some columns lookup or choice types?

  • tommyrihu Profile Picture
    47 on at

    Hi Drrickryp 

     

    is just simple lookup columns 

     

    /tommy

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Which ones?

  • tommyrihu Profile Picture
    47 on at

     

    Status

    ID

    Butiksnamn

    Kontorsdator

    Skrivare

     

    is this loumns from my sharepoint list helpdesk

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi Tommy,

    The problem is that Sharepoint lookup columns are actually tables with an ID and Value column.  When you want to reference them, you need to use either the ID or Value property.  I suggest the following:

     

    SortByColumns(
     Filter(
     Helpdesk;
     TextSearchBox1.Text in Title || 
    TextSearchBox1.Text in Status.Value || TextSearchBox1.Text in Butiksnamn.Value ||
    TextSearchBox1.Text in Kontorsdator.Value ||
    TextSearchBox1.Text in Skrivare.Value); "ID"; If(SortDescending1; Descending; Ascending)

    Let me know if that works for you.  In the example, I set the gallery Items property to Filter(Products, TextInput2.Text in Product_x0020_Name || TextInput2.Text in Category.Value) and as you can see, all the items in the gallery have either "be" in the Category or Product name.  Category is a Sharepoint Lookup type field.

     

     

    examplewithlookup.PNG
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    I believe that you could also use @CarlosFigueira's design but modified for the Lookup column types but I haven't tested this.

    SortByColumns(
     Filter(
     Helpdesk;
     StartsWith(Title; TextSearchBox1.Text) Or
     StartsWith(ID.Value; TextSearchBox1.Text) Or
     StartsWith(Status.Value; TextSearchBox1.Text) Or
     StartsWith(Butiksnamn.Value; TextSearchBox1.Text) Or
     StartsWith(Kontorsdator.Value; TextSearchBox1.Text) Or
     StartsWith(Skrivare.Value; TextSearchBox1.Text));
     "ID";
     If(SortDescending1; Descending; Ascending)
  • tommyrihu Profile Picture
    47 on at

    hi Drrickkryp

     

    here i s the results

     

     

    red.JPG

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    What does the gallery look like without the filter? Just with the items of the gallery set to SortByColumns(HelpDesk;"ID"; If(SortDescending1; Descending; Ascending)).

    If it looks good, try applying each filter one by one until you find out which ones give you an error. 

    Filter(SortByColumns(HelpDesk;"ID"; If(SortDescending1; Descending; Ascending));StartsWith(Title; TextSearchBox1.Text)) , then try Filter(SortByColumns(HelpDesk;"ID"; If(SortDescending1; Descending; Ascending));StartsWith(Status.Value; TextSearchBox1.Text)) etc.

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

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard