SOLVED

MS Forms -> Dynamics 365 (Multiselect Options)

New Contributor

When a 'MS Form' is submitted, I want to create a Dynamics 365 record. I have no issue w/ this until a (multiselect option) in MS Forms is applicable w/ the desire to take those values and populate a multiselect option set in Dynamics 365.

 

Suppose this is the multiselect option on MS Forms:

    Option 1

    Option 2

    Option 3

    Other

 

I can make the labels of the CRM fields to make the labels of the various options to assist.

 

If the user entered selected the first 3, they would be returned w/ the 'Get Response details' step as follows: ["Option 1","Option 2","Option 3"]

 

However, if they selected all four, then they would be returned as: ["Option 1","Option 2","Option 3","Whatever they type in 'Other'"]

 

Therefore, even w/ an inefficient approach to convert those values from 'MS Forms' into the needed CRM values of the picklist, it doesn't work due to that 'Other' option since the value returned by it will be whatever they write in.

 

So what makes sense to how to get those MS Forms multiselect options into a CRM multiselect option set when 'other' is a possibility?

 

 

 

1 Reply
best response confirmed by JestonMorris (New Contributor)
Solution

I solved this on my own. Probably not the most efficient way, but it works.

 

Parse JSON

Create two integer vars

Create an array var

Create two string vars

Put the Parse JSON in an array var

Switch on each value from the array

       if the value equals the case, store the value (crm field) into a string var but w/ a ', ' at the end

       default, store the value (crm field for 'other') into the string var & store the value into the other string var for 'other'

Set an integer var to the array length

Set the other integer var to the array length - 2 (removes that final ', '

substring 

profit