SOLVED

Append String Variable gives me more than the value I want

Brass Contributor

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:

Jake_Hembree_0-1650027812037.png


This is the result, I only want to concatenate the highlighted sections (value) with a comma between them.

Jake_Hembree_1-1650027893268.png

 

4 Replies

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.

 

jonlake_0-1650194995502.png

 

 

jonlake_0-1650126599035.png

 

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.

@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.

Jake_Hembree_1-1650233449218.png

 

 

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. 

Jake_Hembree_2-1650233517393.png


Thanks for your continued help. I appreciate it. :)

 

best response confirmed by Jake_Hembree (Brass Contributor)
Solution

Hi @Jake_Hembree, I've captured the steps in a short animation, which should explain how I do it.

 

concat.gif

This is perfect! It works! Thank you so much for your help!
1 best response

Accepted Solutions
best response confirmed by Jake_Hembree (Brass Contributor)
Solution

Hi @Jake_Hembree, I've captured the steps in a short animation, which should explain how I do it.

 

concat.gif

View solution in original post