cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Sharepoint Filter Query not returning expected result

I have a large sharepoint document list with around 60k files.   I want to pull back 10 files limited by top count.  I am looking for files with a file name that contains XXX and a document type (custom field) that is not YYY

 

using the odata filter query:

(substringof('XXX',FileLeafRef) and Document_x0020_Type ne 'YYY')

 

I dont pull back any results.

 

If i run the filter queries separately i do get expected results.   Why won't the query return any data?

1 ACCEPTED SOLUTION

Accepted Solutions
PrasadAthalye
Super User
Super User

I created Document Type column with space in it and my internal name was DocumentType. I built following expression and it worked perfectly fine ... I did not include brackets in the expression

 

PrasadAthalye_0-1620940791125.png

Can you test without brackets? Only other thing I am guessing is throttling exception..

 

Alternatively, can you create a view inside library with those 2 conditions and see if you get result? Instead of FileLeafRef you can use Name of the file.

 

substringof('AI',FileLeafRef) and DocumentType ne 'Testing'

 

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

2 REPLIES 2
PrasadAthalye
Super User
Super User

I created Document Type column with space in it and my internal name was DocumentType. I built following expression and it worked perfectly fine ... I did not include brackets in the expression

 

PrasadAthalye_0-1620940791125.png

Can you test without brackets? Only other thing I am guessing is throttling exception..

 

Alternatively, can you create a view inside library with those 2 conditions and see if you get result? Instead of FileLeafRef you can use Name of the file.

 

substringof('AI',FileLeafRef) and DocumentType ne 'Testing'

 

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

Anonymous
Not applicable

Thanks looks like a list size issue.  removing the odata and creating a view with the fields and filters i need has worked and is a reasonable work around for what im trying to do.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Top Solution Authors
Users online (1,951)