cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Help Me Understand Dynamic Content

I'm trying to wrap my head around a few concepts with Power Automate. In my flow, I pull from an Excel table. I then Select array from that to pull just the properties I need. After this, when I try to write an expression using the output from Select, I don't see any content other than Output. In my screenshot below, you can see that I populated the Select array using the dynamic content from Excel (green values), but when I'm in Compose 2, I'm not offered dynamic content from the new array (purple values) to work with.

At this point, I'm just trying to understand how this all works. My expectation was that I'd see "purple" versions of all the "green" content.

Screen Shot 2020-11-06 at 4.05.57 PM.png

 

I ultimately want to set up some conditions and add properties to the new array, but if I try to make an action on the array while calling values from the list, it automatically creates a nested "apply to each" and that feels wrong.  

1 ACCEPTED SOLUTION

Accepted Solutions
Frequent Visitor

The Compose action was just an example of my not being able to call up "purple" dynamic content. I solved what I needed to solve and I'll describe it below using the Create HTML table action. A lot of this is workaround, but I got it to work! (But I will also share some weird observations.)
So the output of "List rows in a table" is an array for which I am offered the use of each column from Excel as a property, aka "green" dynamic content. This screenshot shows what I mean; I can use the "value" output from the List rows action and I can just select what I want to see in my HTML table.

Screen Shot 2020-11-09 at 12.15.44 PM.png

 

However, I am working with a new array I created, which includes all the same properties, plus an additional property added a couple steps prior. When I set the input to use this array, there is no "purple" dynamic content that I can use for my HTML table.Screen Shot 2020-11-09 at 12.09.08 PM.png

 

The only dynamic content that I can select is the "green" dynamic content. However, as soon as I select one, the flow automatically creates an Apply to each and this is something I'm not sure I want. So I just delete this whole thing and start this step over because I just can't wrap my head around what flow is trying to tell me.

Screen Shot 2020-11-09 at 12.13.05 PM.png

 

Here is my workaround. I start filling out my Create HTML action as if I'm working from the List rows array (just like the first screenshot), but then I just switch out the input from the green content that says "values" to the purple "Body" of the array I want to work with.

Screen Shot 2020-11-09 at 12.16.06 PM.png

 

After I save and test, all that green dynamic content becomes purple! (and the output works!)

Screen Shot 2020-11-09 at 12.16.46 PM.png

 

Almost there! Recall that the array I'm working with has a new property added to each object, so there's no "green" dynamic content for it. To add that, I had to use the item() expression. This is what that looks like.

Screen Shot 2020-11-09 at 12.18.45 PM.png

 

Guess what? After a save and test, that pinkish item() box became a purple one called "Status"!

Screen Shot 2020-11-09 at 12.51.38 PM.png

 

I'm not sure if this is by design or what, but I'm just glad to know that I am ultimately able to create an html table from an array using the properties from that same array. 

View solution in original post

2 REPLIES 2
Super User II
Super User II

You have to assign a variable for each output you want, as each compose only has one output. However, that output can be different output types (string, array, etc.).

Conversely, you can use the join operation to take many inputs and compile them into a single output. You can also use functions to concatenate multiple outputs together in a logical order:

How you currently are using your compose operation would be for parsing all of the data into a single JSON, HTML, Text, or similar outputs.

An option you may have not considered, is that you could initialize a variable for the entire row, which would give you that single output. Example: 

VariablesExamples.JPG

How you compose, depends on your needs for the output. If you want a variable for each of the Excel columns dynamic data, you'll need to compose a variable for each or utilize a Filter Array.

If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE. Want to know more? Follow @BradGroux on Twitter, and check out my Medium blog at https://msft.engineer.

 

 

Frequent Visitor

The Compose action was just an example of my not being able to call up "purple" dynamic content. I solved what I needed to solve and I'll describe it below using the Create HTML table action. A lot of this is workaround, but I got it to work! (But I will also share some weird observations.)
So the output of "List rows in a table" is an array for which I am offered the use of each column from Excel as a property, aka "green" dynamic content. This screenshot shows what I mean; I can use the "value" output from the List rows action and I can just select what I want to see in my HTML table.

Screen Shot 2020-11-09 at 12.15.44 PM.png

 

However, I am working with a new array I created, which includes all the same properties, plus an additional property added a couple steps prior. When I set the input to use this array, there is no "purple" dynamic content that I can use for my HTML table.Screen Shot 2020-11-09 at 12.09.08 PM.png

 

The only dynamic content that I can select is the "green" dynamic content. However, as soon as I select one, the flow automatically creates an Apply to each and this is something I'm not sure I want. So I just delete this whole thing and start this step over because I just can't wrap my head around what flow is trying to tell me.

Screen Shot 2020-11-09 at 12.13.05 PM.png

 

Here is my workaround. I start filling out my Create HTML action as if I'm working from the List rows array (just like the first screenshot), but then I just switch out the input from the green content that says "values" to the purple "Body" of the array I want to work with.

Screen Shot 2020-11-09 at 12.16.06 PM.png

 

After I save and test, all that green dynamic content becomes purple! (and the output works!)

Screen Shot 2020-11-09 at 12.16.46 PM.png

 

Almost there! Recall that the array I'm working with has a new property added to each object, so there's no "green" dynamic content for it. To add that, I had to use the item() expression. This is what that looks like.

Screen Shot 2020-11-09 at 12.18.45 PM.png

 

Guess what? After a save and test, that pinkish item() box became a purple one called "Status"!

Screen Shot 2020-11-09 at 12.51.38 PM.png

 

I'm not sure if this is by design or what, but I'm just glad to know that I am ultimately able to create an html table from an array using the properties from that same array. 

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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!

Top Solution Authors
Users online (6,712)