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 Automate
Answered

Concat variables

(0) ShareShare
ReportReport
Posted on by 119
Dear all,
 
I have a flow with a trigger "When an item is created or modified" and in one of my conditions I need all the items from the SP list to be exported to a csv and sent by e-mail.
The problem is that one of the choice fields is multi-select field (Destination Country) and that is why I need a variable to have all the choices in one field as a string (DestinationCountries).
However, as a result of my flow below I get a csv with all the list items, but all of them have the same value from the multiselect choice field - DestinationCountries of the item that was modified.
 
Could you please advise how to avoid having all the rows in the csv with the same destination countries?
 
Thank you in advance.
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Gopala_Krishna Profile Picture
    1,495 on at
    Set variable would keep updating the values from the previous iteration with the recent one, to avoid this from happening you can use "Append to string variable" action
     
     
  • Verified answer
    Chriddle Profile Picture
    8,685 Super User 2026 Season 1 on at
    A more efficient method using XPath instead of loop and variable:
     
     
    Here the Sharepoint's choice column is named "TestChoice".
    Create an XML from the TestChoice array and query the values.
    Then join these values. 
     
    join(
    	xpath(
    		xml(json(concat('{"Root":{"Item":', item()['TestChoice'], '}}'))),
    		'//Item/Value/text()'
    	),
    	','
    )
     
    The result looks like this:

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 881

#2
Valantis Profile Picture

Valantis 823

#3
Haque Profile Picture

Haque 485

Last 30 days Overall leaderboard