Dynamically storing MS Forms Drop down field values into D365 CRM Option Set using Power Automate Flow
MS Forms offers a functionality to create a dropdown field which is similar to an option set fields in D365 CRM, But when it comes to mapping or storing values between these two field things become a bit tricky. However there are a few workaround using power automate capabilities.
In this blog let’s see how we can store a MS Forms Dropdowns options into an Option Set field in CRM.
What is an Option Set?
Option sets are a field type that can be created within Dynamics CRM and are Often referred to as “dropdown” or a “pick-list”.
An option set has two identities for each of its option. The Options Label Name and the Label Value as shown in the below snapshot.
What is a Dropdown in MS Form ?
A dropdown is a list of defined options(Choice) that can be selected by a user, unlike a text field where the data can be “organic” or manually entered.
Now Let’s Consider an use case :
Consider we have a MS Form Name “Company Registrations” when a user submits this form a Power Automate flow is triggered which creates a new Account record in CRM with the field mapping shown in similar colors in the below snapshot.
- Now we need to get the form responses first to create a new Account record.
2. All the Text field values can be directly mapped into the dataverse connector as shown in the below snapshot.
3. For mapping the MS forms Dropdown to the Option set we need to maintain the CRMs Option Label values into our flow as to set (define the value of the option set) Option Sets in CRM we need to pass the Label Values to the flow (if you just pass the label text it won’t work hence we need to maintain these option set values in the flow)as shown below.
4. Now we need to select the option set field in our flow connector and select enter custom value.
5. Once you are able to add a customer value use the following expression which will dynamically bring option set label value for the dropdown choice selected by the user on the form.
Expression – outputs(‘Option_Set_Values’)?[outputs(‘Get_Form_Response’)?[‘body/rf98dd4fb83624fc7b7314de77542a3ef’]]
Red : Text in the above expression corresponds to “Outputs “in the below snapshot which is the output of the compose in which we stored our option set label values.
Blue : Text corresponds to the “Ownership Type” from the form response.
MS Form Submission –
Created Account Output –
Hope this helps !