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 / Getting document name ...
Power Automate
Answered

Getting document name and put it in approval list

(0) ShareShare
ReportReport
Posted on by 129

Hi,

 

I have file with version name where i would like to put it into the approval list so that it can show which version of the file we are currently using. But it seems like i am not able to initialize and set the variable to the file name.

2023-08-08_12-09-12.png

2023-08-08_11-55-23.png

 

I have set up the flow to filter Form56 but it gave me a list of table, then i tried to take out the file name from the table, it does not work.

 

Please advice.

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @Appleonwindows 

     

    To get the file name & version number, you don't require looping the "Get files (properties)" action. Pls modify the flow as per below sample flow:

    1. After "Get files properties" action, add "Fiter array" action to filter the records based on the name:

    ManishSolanki_0-1691472337848.png

     

    2. As filter array action returns an array so we will fetch the first element of the array using first() formula and then fetch the properties 'file name with extension' and 'version number':

    ManishSolanki_1-1691472482709.png

    Expression needs to be written in expression box, below is the expression used for getting the file name with extension:

    first(body('Filter_array'))?['{FilenameWithExtension}']

    Similarly, we will get the version number in another compose action using the expression:

    ManishSolanki_2-1691472605580.png

    Expression used for getting the version number:

    first(body('Filter_array'))?['{VersionNumber}']

     You can use the output of compose action to show the file name & version number in the approval action.

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

     

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    @Appleonwindows 

    The "Get file properties" action will consistently return a table, even when it contains just a single row.

    To streamline the process, you can utilize a Filter query within the action to ensure the return of a unique record.

    By incorporating an "Apply to each" loop, it will execute only once.

    Note that variables cannot be set within a loop; you should employ a compose action instead.

     

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard