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 Apps / Power Automate Flow - ...
Power Apps
Unanswered

Power Automate Flow - Use variable as File Name in 'Get File Content' action 'File Identifier Field'

(0) ShareShare
ReportReport
Posted on by 45

So my flow works wonderfully, until I attempt to use a variable name in the 'Get File Content' action 'File Identifier Field'. I need to do this to load a different template depending on the value returned from a condition block. I was so confident that this would work because the logic makes perfect sense. But it failed miserably and I have spent hours researching and trying to fix it but to no avail and it is out of desperation that I decided to give this platform a try. Can someone please help me? Any help at all would be greatly appreciated.

 

I have included attached a picture in reference to the block that I need to work, after which everything else will be fine.

 

Also, I am new here but I did my best in creating this first question.Snap 2022-01-07 at 20.58.01.png

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @Strikerme ,

    I have actually tried that one as I have a heap of standard forms merged off Word Templates. What I believe is happening in the background is that the Flow is getting the identifier of the file to retrieve it, so (like a lot of other elements in Power Platform), you cannot refer to it dynamically.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Strikerme Profile Picture
    45 on at

    Thank you so much for your response. It is a pleasure to meet you by the way @WarrenBelz You don't know how many answers of yours have actually helped me out when I was in dire situations. I can't believe I'm actually talking to you. I feel starstruck.

     

    For your scenario what work around did you use? I was thinking of just putting everything in the conditional blocks but that would be overkill because there is just too many actions and it seems very impractical.

    Please let me know the alternative viable options.

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @Strikerme ,

    I have a couple of large flows with conditional branches (it seems up to 10 work fine) based on the form needed to be generated (which I send as a parameter). I do as much as possible "at the top" before branching and then generate the documents which I PDF, store in SharePoint and on some email to various people.

    Nice to meet you as well - I am just and old guy from Australia sharing a lot things I have learnt from making mistakes . . . also I am not a Flow guru (far from it), so you might want to post this on the Power Automate Community.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Strikerme Profile Picture
    45 on at

    @WarrenBelz Thank you so much for pointing me in the right direction. I will create the post over in the power automate community.

     

    By the way you've helped me out not only on here but on other blog articles on your site (https://www.practicalpowerapps.com) as well. It is folks like yourself who makes learning a more pleasant experience.

    So thanks a mill.

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @Strikerme ,

    I have now put brain fully in gear - you cannot possibly define the merge target dynamically as the next element displays all the merge fields in the form so you can put values in them. You cannot open this element without the Flow knowing the merge document it has to deal with.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Verified answer
    Strikerme Profile Picture
    45 on at

    Hi @WarrenBelz,

    Thank you so much for your very insightful response once more. You are indeed correct and because of your advice I abandoned that approach. Instead I figured out an alternative solution yesterday that works by just storing the variable value in the 'Item Id' value instead because that one can be dynamic without any problems.

     

    I was so focused on reducing repetitive actions that I did not really look at this solution that was staring me right in the face. It is just one extra action in the condition block and so it is not that bad and it works wonderfully.

     

    I have explained my work around here on the Power Automate Community: https://powerusers.microsoft.com/t5/Building-Flows/Power-Automate-Flow-Use-variable-as-File-Name-in-Get-File/m-p/1409773

  • Suggested answer
    TC-13101851-0 Profile Picture
    2 on at
    I attempted to go to the link specified in this paragraph, above:
     
     
    However, the link goes to a generic "Be a part of something bigger" page that offers nothing in the form of a viable "answer".
     
    Please provide an updated link to the Answer...Thanks!

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard