cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mick282
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

 

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
Mick282
Helper III
Helper III

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?

 

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.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,345)