cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

StartsWith in combination with && (and) filter

The problem is SP lists with over 500 elements. And getting a result that show element 501 ->

 

This works: (without the second value in the filter)

SortByColumns(Filter(Source;StartsWith(Title;TextSearchBox1.Text)||StartsWith(Contact;TextSearchBox1.Text)||StartsWith(Customer;TextSearchBox1.Text)||StartsWith(Text;TextSearchBox1.Text));"Created";If(SortDescending1; Descending; Ascending))

 

This does not work: the search stops at element 500
SortByColumns(Filter(Source;StartsWith(Title;TextSearchBox1.Text)||StartsWith(Contact;TextSearchBox1.Text)||StartsWith(Customer;TextSearchBox1.Text)||StartsWith(Text;TextSearchBox1.Text);Status<2);"Created";If(SortDescending1; Descending; Ascending))

 

SortByColumns(Filter(Source;StartsWith(Title;TextSearchBox1.Text)||StartsWith(Contact;TextSearchBox1.Text)||StartsWith(Customer;TextSearchBox1.Text)||StartsWith(Text;TextSearchBox1.Text)&&Status<2);"Created";If(SortDescending1; Descending; Ascending))

 

SortByColumns(Filter(Source;And(StartsWith(Title;TextSearchBox1.Text)||StartsWith(Contact;TextSearchBox1.Text)||StartsWith(Customer;TextSearchBox1.Text)||StartsWith(Text;TextSearchBox1.Text);Status<2));"Created";If(SortDescending1; Descending; Ascending))

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: StartsWith in combination with && (and) filter

I think this is happening because the '>' operator is not delegatable in Sharepoint, which results in running your query locally (in the 500 rows). Please see this post which lists all the supported delegatable predicates and functions for SharePoint.

 

https://powerapps.microsoft.com/en-us/tutorials/delegation-list/

View solution in original post

6 REPLIES 6
Highlighted
Power Apps
Power Apps

Re: StartsWith in combination with && (and) filter

I think this is happening because the '>' operator is not delegatable in Sharepoint, which results in running your query locally (in the 500 rows). Please see this post which lists all the supported delegatable predicates and functions for SharePoint.

 

https://powerapps.microsoft.com/en-us/tutorials/delegation-list/

View solution in original post

Highlighted
Power Apps
Power Apps

Re: StartsWith in combination with && (and) filter

Sharepoint doesn't support '<' operator in delegation. But it supports '=' operator in delegation. So if you change the expression to use Status = 2 then it would run on all the items in the list.

Highlighted
Power Apps
Power Apps

Re: StartsWith in combination with && (and) filter

Sorry didn't see that you have && operator as well there. This is also not supported by sharepoint yet in delegation. So using = operator in your case wouldn't help either. What you can do is that filter using only one condition (Using startswith or '=' operator) if that returns results less than 500 and then collect those values and then apply other filters on it.

Highlighted
Power Apps
Power Apps

Re: StartsWith in combination with && (and) filter

Actually, && is supported in delegation 🙂

Highlighted
Power Apps
Power Apps

Re: StartsWith in combination with && (and) filter

Indeed it is supported. 🙂 Sorry for the confusion.

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: StartsWith in combination with && (and) filter

Thanks @SinanE and @ShantanuP,

 

Seems that changing the < to = (equal) did the trick.:-)

Next question: is it possible to use the equal in combination with Author.Displayname (lookup) = some text field.

 

Seems like that last equal is not supported yet? Lookups.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,568)