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 / Append to string varia...
Power Automate
Answered

Append to string variable overwrites

(0) ShareShare
ReportReport
Posted on by 157

Hi, 

 

I am developing a flow in which I need to build up a string containing email addresses to send an email to. I have a Get items action to get all the rows from a SharePoint list. Then I have an Apply to each to loop through each of these rows. In this action I Append to string variable. However, the final variable is always set to the last row in the Get Items action., rather than appending each row as expected.

 

This is the relevant section of my flow:

 

petewalburn_0-1667897951719.png

When I test the flow I can see that for each row of the Get items action, the Append to string action always overwrites the 'Extended GBU Team Emails' variable.

 

Pete

Categories:
I have the same question (0)
  • Verified answer
    Sundeep_Malik Profile Picture
    6,484 on at

    Hey @petewalburn 

     

    It shouldnt happen like that. Maybe you are just checking apply to each value. That will just show you the current value that it appended.

     

    Can you try this thing. Add a compose action outside apply to each and pass the variable in it. Now you will be able to see that all the emails have appended into that variable.

     

    Probably you are reading the value incorrectly. Rest I see no problem in your flow. Can you also tell the ultimate goal of this? Like at the end you will send the same mail to all the people.

     

     

  • petewalburn Profile Picture
    157 on at

    Sundeep_Malik

     

    Thanks very much. Adding the compose after the Apply to Each did show that the variable is populated properly with all the emails.

     

    Yes, the ultimate goal is to send the same email to all of the people in th elist.

     

    Pete

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard