cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Converting a Typeform multi-select field object output into a comma separated value

Hi all,

 

I'm using the Typeform connector to input data into Dynamics 365. Everything seems to work fine until I use a multi-select question type in Typeform.

 

They seem to have changed the flow connector for typeform and now multi-select options come out in this type of object format as opposed to concatenated and separated by commas. Below is an example of a multi-select output:

 

{"labels":["option 1","option 2","option 3"]}

On the multi-select I selected option 1, option 2 and option 3 and it comes into Dynamics like above.

 

How do I convert this to:

option 1, option 2, option 3

Any help would be greatly appreciated.

 

So I tried using the parse JSON step to convert the object and then tried using compose to insert the Label values to see what comes out. I also tried using the following expression:

 

concat(body('Parse_JSON')?['labels'])

Parse JSON.png

But they all give the same result:

 

["option 1","option 2","option 3"]

If I use the item value it'll try to apply multiple times for each item in the array.

Kind regards,

Mike

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Converting a Typeform multi-select field object output into a comma separated value

 

Hi @Mick282 ,

 

I think Join action is a good choice. If you want to reduce the steps, you could try to use join() function directly.

I use Compose here for example. You could configure this expression in any field you want to configure, which can reduce many steps.

join(triggerBody()?['form_response']?['answersObject']?['fieldid']?['value']['labels'],',')

109.PNG

You could get the fieldid by the method provided in this thread:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/Mapping-a-single-select-field-type-in-Ty...

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Helper III
Helper III

Re: Converting a Typeform multi-select field object output into a comma separated value

So I've managed to find a way around this basically:

 

1. Parse the JSON output of the multi-select question to isolate the array value

2. Use the Join flow step to join arrays with a comma as the separator. 

 

Concatenate.png

 

My question is that this seems a bit too inefficient. It requires two steps to concatenate 1 multi-select question. It would create gigantic Flows if Typeform has mutliple multi-select questions.

 

Is there a way to do this in one step or at least convert the object output of the typeform question to array straight away without having to use the parse JSON step?

Highlighted
Community Support
Community Support

Re: Converting a Typeform multi-select field object output into a comma separated value

 

Hi @Mick282 ,

 

I think Join action is a good choice. If you want to reduce the steps, you could try to use join() function directly.

I use Compose here for example. You could configure this expression in any field you want to configure, which can reduce many steps.

join(triggerBody()?['form_response']?['answersObject']?['fieldid']?['value']['labels'],',')

109.PNG

You could get the fieldid by the method provided in this thread:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/Mapping-a-single-select-field-type-in-Ty...

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,506)