I have set up a variable so that I can get the comments from an approval and add them into the next approval. I am now trying to get each approvals comments separately instead of all in one variable so i can add them to separate excel columns. I have placed a compose action under the append to string variable but when trying to get the compose action in the dynamic content it doesn't appear as it is in an apply to each. How do I overcome this?
If you manually use the JSON Outputs('Compose') once you exit the loop you will have access to the comments. But at that point the Compose will be an array of all the entries you made inside the loop.
I have just attempted to manually use the JSON Outputs('Compose') and still unable to access the comments so that i can update each individual column in the excel with each approval comments.
I don't understand your problem at all, but in any case... Why don't you try to store the comments inside an Array instead of using a single variable for all the comments?
With an array can i choose to take multiple comments and use them in Start and Wait for Approval Description and in other cases only take certain comments i.e. Start and Wait for Approval 2's comments only and update a column in excel labelled Approval 2 Comments?
Just trying to understand your problem... But I can't :S Let's see if other Superusers can help!
I've been struggling to explain it myself to be honest, what I am trying to do is run a multi-approval flow that depending on a certain questions answer from Microsoft Form do a different thing. Problem i kept running into was Nesting issues due to a lot of Apply to each actions in my flow from trying to get approvals comments and approves emails into other actions.
Here's a simple example
If you look at the results of Compose 2 'outputs('Compose') you will see it is an array of each response added to the Compose inside the loop.
Using JSON we can access individual elements of that array as seen in the output of Compose 3 'outputs('Compose_2')', This is the second element in the array. So the individual comments can now be used outside of the array.
Makes sense, will have a go. From this I should be able to add all the comments from each different approval into the compose action and take out individual elements to update a column in an excel spreadsheet or take out all of the elements to fill the next approvals description.
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!