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

Notifications

Announcements

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,185 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard