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

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

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard