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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using generated refere...
Power Automate
Unanswered

Using generated reference to a variable

(1) ShareShare
ReportReport
Posted on by 932

With @Diksha's help, I have generated a correct-looking reference to a variable using the following formula:

 

concat('variables(','''','strHTMLChartSect',string(variables('intSectNum')),'''',')')
interpolating variables 1.png

 

---------------------------------------------------------------------------------------------------------------------------------
interpolating variables 2.png
When I try to use the outputs as an inputs to access the value of the variable, it adds the text for the variable, but not the value of the variable:
interpolating variables 3.png

My Question

How do I get Flow to return the value of the variable and not just the text reference to the variable?

 

Thank you for your assistance with this; it is much appreciated.

 

@Hardesh15 was helping me with something similar earlier, and got close, but we never quite got to a solution.

If it helps, here is the Peek Code:
interpolating variables 4.png

 

 
 
 
 
Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,858 Most Valuable Professional on at
    Re: Using generated reference to a variable

    Hi @BenDonahue 

     

    Looks like the issue is on your concat expression. What you trying to produce in your concact expression?

  • BenDonahue Profile Picture
    932 on at
    Re: Using generated reference to a variable

    @abm,

    I believe I have what I want:

    variables('strHTMLChartSect1')

     

    How do I use this string to access the variable, strHTMLChartSect1?

  • Verified answer
    Diksha Profile Picture
    301 on at
    Re: Using generated reference to a variable

    Hello @BenDonahue ,

     

    Use below expression to get the expected output - 

    split(variables('strVariable'),'''')[1]

     

    Capture1.PNG

    Output - 

    Capture.PNG

     

    If this answered your question, please mark this question as answered and if you liked my response, please consider giving it a thumbs up .

    Thank You !!!

  • BenDonahue Profile Picture
    932 on at
    Re: Using generated reference to a variable

    I think what I should have done was generate the variable name on it's own:

    concat('strHTMLChartSec",variables('SectNum'))

    , and then insert that output in the next compose:

    variables(outputs)

    I'll try that and see if it works.

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard