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
Community Champion
Community Champion

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
Community Champion
Community Champion

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
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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,588)