cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MrMarshall
Frequent Visitor

Get files with Odata filter on name

I am trying to get files in a document library witha filter on Name, not Title.

I do understand the difference between column Name and Title in a Sharepoint library, but the customer is not using Title field.

 

Running the action Get files (properties only) with the Odata query "Name eq 'TestName'" returns an error saying that the column Name does not exists.

 

Have anyone succedded with running the action "Get Files (properties only)" with a simple filter on the default Name column in a Sharepoint library?

 


Screenshot_502.png

 

5 REPLIES 5

Hi @MrMarshall when you get under the covers of SharePoint, Name doesn't actually exist as a column within the library. It is actually something which is calculated which is why it is surrounded by { } when you look at the output without a filter applied.

 

The best field to try and filter your query on is "FileLeafRef" which contains the full filename e.g. MattWeston365.docx

 

So if you query based on that column with the full document name then you will retrieve the item you want back.

v-bacao-msft
Community Support
Community Support

Hi @MrMarshall ,

 

As @MattWeston365 described, Name field is actually wrapped in {} with the field name, so it cannot be applied to Filter Query.

26.PNG

Please consider using Condition or Filter array to filter the items.

Image reference:

24.PNG25.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
arctirux
Frequent Visitor

Hi,

You can use Title eq '' .

title.PNG

 

 

 

 

 

 

 

 

 

 

 

 

I hope that helps.

FileLeafRef works for me:

fileleafref-2.PNG

This solution worked like a charm. Thanks for the solution

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,817)