cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BenDonahue
Continued Contributor
Continued Contributor

Using generated reference to a variable

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

 

 
 
 
 
1 ACCEPTED SOLUTION

Accepted Solutions

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 !!!

View solution in original post

4 REPLIES 4
abm
Super User III
Super User III

Hi @BenDonahue 

 

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



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
BenDonahue
Continued Contributor
Continued Contributor

@abm,

I believe I have what I want:

variables('strHTMLChartSect1')

 

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

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 !!!

View solution in original post

BenDonahue
Continued Contributor
Continued Contributor

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.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (65,494)