Forum Discussion
Append String Variable gives me more than the value I want
I've got a SharePoint list that has a multiple choice column that I'm trying to concatenate so those values can be entered into one section of an Adaptive Card. When I use the Append String Variable action at the end, it gives me more data that I need and I don't know to fix that. I've tried to Parse the JSON and that never seemed to work the way I wanted and I'm not sure if there's an expression that can help.
Here's my flow:
This is the result, I only want to concatenate the highlighted sections (value) with a comma between them.
- jonlakeIron Contributor
Hi Jake_Hembree , you can do this without needing variables.
I mocked up a flow with a Get Items action pulling back all records from a list which contains a multi-select field. The following actions then concatenate the multi select into a single line of text, separated by a comma.
You can use a Join action or a Compose action with an expression that uses the output of the Select action join(body('Select'),','). I've used both to demonstrate but one will do the job.
The product can then be used elsewhere.
- Jake_HembreeBrass Contributor
jonlake I tried to set it up like this, but I'm not sure if this is what you meant (including the very beginning.) I had to use Get Items first otherwise it wouldn't let me start with Apply to Each or Scope.
A got an error when I selected SEGMENT from either GET ITEMS or GET ITEM. I'm not sure if this means I need to initialize the variable there to make in into a string or not.
Thanks for your continued help. I appreciate it. 🙂- jonlakeIron Contributor