web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / oData Query for file n...
Power Automate
Answered

oData Query for file name question

(0) ShareShare
ReportReport
Posted on by 361 Super User 2024 Season 1

Hi all, perhaps I'm missing something very obvious but here it goes:

 

I have a file here on this demo site: 

the_dude_0-1711554652822.png

Important to note that the name of the document is in the column 'Name'  and the column 'Title' is a seperate column that is empty.

I want to retrieve this file by it's name (Kwaliteitshandboek VitaFlora Zorgt).

 

the_dude_1-1711554908595.png

 

which results in this error:

the_dude_4-1711555050471.png

 

 

So I'm puzzled as to how to retrieve this specific document using the document's name.

If I run the Get Files without an oData query I can view the JSON data which shows me this:

 

I have removed alot of irrelevant things (headers, thumbnails and identifying information) from this JSON to keep it shorter 

Spoiler (Highlight to read)
{
 "statusCode": 200,
 "headers": {
 "Cache-Control": "max-age=0, private"
 },
 "body": {
 "value": [
 {
 "@odata.etag": "\"4\"",
 "ItemInternalId": "2",
 "ID": 2,
 "Modified": "2024-03-27T15:32:36Z",
 "Editor": {
 "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
 "Claims": "i:0#.f|membership|su",
 "DisplayName": "su",
 "Email": "su",
 "Picture": "https://.sharepoint.com/sites/VitaFlora/_layouts/15/UserPhoto.aspx?Size=L&AccountName=su",
 "Department": "",
 "JobTitle": ""
 },
 "Editor#Claims": "i:0#.f|membership|su",
 "Created": "2024-03-27T15:14:46Z",
 "Author": {
 "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
 "Claims": "i:0#.f|membership|su",
 "DisplayName": "su",
 "Email": "su",
 "Picture": "https://.sharepoint.com/sites/VitaFlora/_layouts/15/UserPhoto.aspx?Size=L&AccountName=su",
 "Department": null,
 "JobTitle": null
 },
 "Author#Claims": "i:0#.f|membership|su",
 "OData__DisplayName": "",
 "{Identifier}": "Gedeelde%2bdocumenten%252fPublicaties%252fKwaliteitshandboek%2bVitaFlora%2bZorgt.pdf",
 "{IsFolder}": false,
 "{Thumbnail}": {
 "Large": "h6"
 },
 "{Link}": "https:// .sharepoint.com/sites/VitaFlora/Gedeelde%20documenten/Publicaties/Kwaliteitshandboek%20VitaFlora%20Zorgt.pdf",
 "{Name}": "Kwaliteitshandboek VitaFlora Zorgt",
 "{FilenameWithExtension}": "Kwaliteitshandboek VitaFlora Zorgt.pdf",
 "{Path}": "Gedeelde documenten/Publicaties/",
 "{FullPath}": "Gedeelde documenten/Publicaties/Kwaliteitshandboek VitaFlora Zorgt.pdf",
 "{IsCheckedOut}": false,
 "{VersionNumber}": "3.0"
 }
 ]
 }
}
{ "statusCode": 200, "headers": { "Cache-Control": "max-age=0, private" }, "body": { "value": [ { "@odata.etag": "\"4\"", "ItemInternalId": "2", "ID": 2, "Modified": "2024-03-27T15:32:36Z", "Editor": { "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", "Claims": "i:0#.f|membership|su", "DisplayName": "su", "Email": "su", "Picture": "https://.sharepoint.com/sites/VitaFlora/_layouts/15/UserPhoto.aspx?Size=L&AccountName=su", "Department": "", "JobTitle": "" }, "Editor#Claims": "i:0#.f|membership|su", "Created": "2024-03-27T15:14:46Z", "Author": { "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", "Claims": "i:0#.f|membership|su", "DisplayName": "su", "Email": "su", "Picture": "https://.sharepoint.com/sites/VitaFlora/_layouts/15/UserPhoto.aspx?Size=L&AccountName=su", "Department": null, "JobTitle": null }, "Author#Claims": "i:0#.f|membership|su", "OData__DisplayName": "", "{Identifier}": "Gedeelde%2bdocumenten%252fPublicaties%252fKwaliteitshandboek%2bVitaFlora%2bZorgt.pdf", "{IsFolder}": false, "{Thumbnail}": { "Large": "h6" }, "{Link}": "https:// .sharepoint.com/sites/VitaFlora/Gedeelde%20documenten/Publicaties/Kwaliteitshandboek%20VitaFlora%20Zorgt.pdf", "{Name}": "Kwaliteitshandboek VitaFlora Zorgt", "{FilenameWithExtension}": "Kwaliteitshandboek VitaFlora Zorgt.pdf", "{Path}": "Gedeelde documenten/Publicaties/", "{FullPath}": "Gedeelde documenten/Publicaties/Kwaliteitshandboek VitaFlora Zorgt.pdf", "{IsCheckedOut}": false, "{VersionNumber}": "3.0" } ] } }

Which contains most importantly:

the_dude_5-1711555457223.png

 

And ofcourse I also tried query with  {Name} eq 'Kwaliteitshandboek VitaFlora Zorgt'  but then the query is invalid.

 

What am I overlooking here? 

 

Thanks in advance.

 

 

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @the_dude,

     

    Try the internal names of those system type fields.

    https://blog.softartisans.com/2009/12/08/list-of-internal-names-for-sharepoint-fields/

     

    In this case try to use FileLeafRef.

     

    Try the below as a Filter Query if you want to match the exact name of the file (including file extension)

    FileLeafRef eq 'Kwaliteitshandboek VitaFlora Zorgt.pdf'

     

    Or if you want to match it partially try:

    startswith(FileLeafRef, 'Kwaliteitshandboek VitaFlora Zorgt')

     

  • the_dude Profile Picture
    361 Super User 2024 Season 1 on at

    Thanks, that was the trick. at least it was not something incredibly obvious I was overlooking but rather something incredibly obscure that you wonder how the .... does anyone figure this out?

  • Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @the_dude,

     

    Yeah, I agree. Hard to figure this out. That's why I am sharing.

     

    I just know this from experience. I have been working with SharePoint for the last 17 years and it always has been FileLeafRef in all versions of SharePoint I worked with. That's why I can remember what the internal of this column is 😁

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard