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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Capture comments in Sh...
Power Automate
Unanswered

Capture comments in Sharepoint list as well as send in an email.

(0) ShareShare
ReportReport
Posted on by 4

Hi

 

I have developed a flow which is doing what I want - get response details when a new form is submitted, then creating and item and then I'm using a switch which has 15 cases based on the answer to a particular question in the form. Depending on this answer it gets sent to the appropriate people for a first to respond approval and then it updates the item and then sends a notification email to the responders email. 

 

I've got this to work to the point I'm happy with however I've been asked by other uses to have the approvers comments show in the sharepoint list and include them in the email. Now I know how to set those but where I'm running in to trouble is trying to initialize a string. When I try to add it to a case it tells me that a string has to be at top level. 

 

From my googling I think my problem is I can initialize strings when I have the switch/case? 

 

This link - Capture comments from approver - had an easy solution to what I wanted to do but I couldn't make it work. 

 

I also tried a variation of this one - Approval workflow capturing comments from approvers email - but it would error when it got to the Switch. 

 

Hoping somewhere here might be able to provide alternatives? Thank You!!! 😀

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @lackinglogic ,

    variables can't be initialised inside loops/switches/etc., if you want a variable you must initialise it at a top level, somewhere right after a trigger. Once it's initialised you can use it anywhere in the flow with the 'Set variable' or 'Append to variable' actions.

    And if you're interested in more alternatives to capture and display approval comments you can check also my approach. 🙂 

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 427

#2
Vish WR Profile Picture

Vish WR 316

#3
David_MA Profile Picture

David_MA 260 Super User 2026 Season 1

Last 30 days Overall leaderboard