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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get File Properties fr...
Power Automate
Unanswered

Get File Properties from File Name

(0) ShareShare
ReportReport
Posted on by 4

Hi all

 

I am trying to create a flow to query a Document Library and return just the files which contain the string 'T2FB' within the Name (File Name) field.  I have successfully created a Get files (properties only) with a query which returns all files that have the string 'T2FB' within the Title field, however when I change the field from Title to Name the flow fails saying that the column Name does not exist.  The issue I have is that not all files have the File Name in the Title field, my query returns only 8 files with the string 'T2FB' in the Title Field however if I run the same query without the filter and export to a csv file there are actually 83 files with the string 'T2FB' in the Name field.

Can someone confirm whether the ODATA Query "substringof" can be run against the Name field of a document library, or is there a workaround that I can use (eg run the query against all files, create an HTML table and filter this table against the Name value to generate the list)?  The purpose of this flow is to search several document libraries and copy all files with the data string in the file name into a single folder for action on a monthly basis, hence I need to return a set of results with the file ID for all files containing the string.

 

The substring query I am using that works successfully is:  substringof('T2FB', Title)

 

However when I change this query to:  substringof('T2FB', Name)

I get the error message "message""Column 'Name' does not exist. It may have been deleted by another user.\r\nclientRequestId: 7340d567-7467-485f-9448-25b666d30c0d\r\nserviceRequestId: e8dc8f9e-4080-7000-cb1c-f607fe9b6ed9"

 

I have tried putting the item Name in round, square and curly brackets (, [, { with and without single quotations and nothing is working.

 

Many thanks in advance!!

 

 

Matthew

 

Categories:
I have the same question (0)
  • v-yuazh-msft Profile Picture
    on at

    Hi @mvatcher,

     

    Please take a try to use the Filter Array action in your flow as screenshot below:

    Capture.PNG

     

    Best regards,

    Alice

  • mvatcher Profile Picture
    4 on at

    Many thanks Alice, I have managed to filter the results using the array which aloows me to progress.

     

    Do you know whehter the Name column can be Queried on for "substringof" in the Get files (properties) step to avoid returning all results and then filtering?

     

    Thanks

     

    Matthew

  • teqs Profile Picture
    103 on at

    @mvatcher wrote:

     

    Do you know whehter the Name column can be Queried on for "substringof" in the Get files (properties) step to avoid returning all results and then filtering?



     

    Same question here! This work around should not be needed. How we can filter by file name with ODATA filter directly? Tried many things, but I don't get a clue why it is not working.

  • cassandra Profile Picture
    19 on at

    Hi all,

     

    I found this article recommending using 'FileLeafRef' rather than 'Name', and that seemed to work for me! That appears to be the SharePoint name for the 'Name' column. I hope this helps you as well!

  • Guy Boswell Profile Picture
    234 on at

    Because why would you call a name column, "Name", when you could call it, "FileLeafRef"?  Are Microsoft deliberately going out of their way to make these things dificult?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard