cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShawnLJ
Helper III
Helper III

Equation for Sharepoint Search function

Just had a quick question about the Sharepoint search function. When I connect an app with Excel there is this search function: SortByColumns(Search(Table1, TextSearchBox1.Text, "Names",,"Names", If(SortDescending1, Descending, Ascending))  This function allows me to add as much search information as I need. So far I have Names as the only one, but I know I can keep adding more which is great. 

 

Now when I add a data sourse through SharePoint I have to use an equation simular to this one: 

SortByColumns(
Filter(SharePointList, StartsWith(Names, TextSearchBox1.Text)),
"Names",
If(SortDescending1, Descending, Ascending))

When I want to keep adding more search functions it does not work, is there a way to be able to add more search options like with the excel data equation? When I try adding more it just turns this into an error. 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Hi Shawn,

 

I know the post is a littlbe bit older, but anyways. I had a similiar issue and it took me quite some time to figure out how to handle it. There's some kind of difference to the excel, but at the end, I found the solution:

 

SortByColumns(Search('sharepointlist';TextSearchBox1.Text;"columnA";"columnB";"columnC");"columnA";If(SortDescending1;Descending;Ascending))

 

The part with the if you don't need as I have the sorting button on my form. I hope it helps.

 

Best regards,

Florian

View solution in original post

2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @ShawnLJ,

 

To achieve this, you also need to use Search function in sharepoint list instead of filter. For your reference:

https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Shawn,

 

I know the post is a littlbe bit older, but anyways. I had a similiar issue and it took me quite some time to figure out how to handle it. There's some kind of difference to the excel, but at the end, I found the solution:

 

SortByColumns(Search('sharepointlist';TextSearchBox1.Text;"columnA";"columnB";"columnC");"columnA";If(SortDescending1;Descending;Ascending))

 

The part with the if you don't need as I have the sorting button on my form. I hope it helps.

 

Best regards,

Florian

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,442)