cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Responsive Resident
Responsive Resident

String Interpolation Syntax in Flow

I am trying to construct some HTML to create a table to add to an email. I have changed the headers of my Excel table such that data that needs to be added in a row are differentiated by incremental numbers, so RDAudit1, RDAudit2, RDAudit3, and so on. 

 

Here is my best attempt at a string interpolation:

body('Get_a_row_3')?['concat("RDAuditQ",variables("intQCounter"))']
 
I tried using an initial Compose to create the column name, like so:
concat('RDAuditQ',variables('intQCounter'))
This produces the correct column name, RDAuditQ1.
When I plug that in, it returns null. 
 
For further debugging, I tried the vanilla code:
body('Get_a_row_3')?['RDAuditQ1']
This worked just fine.
 
In summation:
intQCounter=1
Compose_-_concat = concat('RDAuditQ',variables('intQCounter')) = RDAudit1
body('Get_a_row_3')?['outputs("Compose_-_concat")'] = null
body('Get_a_row_3')?['RDAuditQ1'] = "Yes"
 
I also tried setting a variable to the value of outputs('Compose_-_concat') and then use that variable in the final expression, but no luck:
body('Get_a_row_3')?['variables("spare")']
 
Thank you for your assistance.
1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Hi @BenDonahue ,

 

It seems you probably included an extra pair of quotes around the concat expression.

body('Get_a_row_3')?['concat("RDAuditQ",variables("intQCounter"))']

 

This expression worked for me to read the column of `RDAuditQX` from the table:

 

body('Get_a_row')?[concat('RDAuditQ', variables('intQCounter'))]

 

 

Yutao

View solution in original post

3 REPLIES 3
Microsoft
Microsoft

Hi @BenDonahue ,

 

It seems you probably included an extra pair of quotes around the concat expression.

body('Get_a_row_3')?['concat("RDAuditQ",variables("intQCounter"))']

 

This expression worked for me to read the column of `RDAuditQX` from the table:

 

body('Get_a_row')?[concat('RDAuditQ', variables('intQCounter'))]

 

 

Yutao

View solution in original post

Microsoft
Microsoft

Hello @BenDonahue 

Thanks for bringing your questions to us. What you describe is a very specific scenario, so I will dig more based on the information provided.

I will get back to you on this same thread as soon as I have additional details to share.

 

Thanks.

Responsive Resident
Responsive Resident

@Yutao ,

 

You are correct, sir. If it weren't for dumb mistakes, I'd make (almost) none at all.

 

Now I can deliver on what I promised.

 

Much thanks!

 

-Ben

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (81,107)