cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mick282
Level: Powered On

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
Community Support Team
Community Support Team

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
Mick282
Level: Powered On

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?

Community Support Team
Community Support Team

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,171)