cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StephenXYZ
Regular Visitor

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

StephenXYZ
Regular Visitor

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA 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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (17,526)