cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tommyrihu
Level: Powered On

Search sharepoint columns

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

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Search sharepoint columns

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.

View solution in original post

Super User
Super User

Re: Search sharepoint columns

Hi Tommy,

Are some columns lookup or choice types?

View solution in original post

14 REPLIES 14
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Search sharepoint columns

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.

View solution in original post

tommyrihu
Level: Powered On

Re: Search sharepoint columns

 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

Super User
Super User

Re: Search sharepoint columns

Hi Tommy,

Are some columns lookup or choice types?

View solution in original post

tommyrihu
Level: Powered On

Re: Search sharepoint columns

Hi Drrickryp 

 

is just simple lookup columns 

 

/tommy

Super User
Super User

Re: Search sharepoint columns

Which ones?

tommyrihu
Level: Powered On

Re: Search sharepoint columns

 

Status

ID

Butiksnamn

Kontorsdator

Skrivare

 

is this loumns from my sharepoint list helpdesk

Super User
Super User

Re: Search sharepoint columns

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.

 

 

Super User
Super User

Re: Search sharepoint columns

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
Level: Powered On

Re: Search sharepoint columns

hi Drrickkryp

 

here i s the results

 

 

red.JPG

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 249 members 5,341 guests
Please welcome our newest community members: