Bulk Edit Multiselect optionset/choices fields using Microsoft Power Automate

Sending
User Review
0 (0 votes)

Introduction

I ran into a situation where I need to edit the Multiselect optionset (choices) field in bulk. I thought it could be easily achieved by using the Bulk Edit option but there was a problem. I could not do that because when I select the records and click on Bulk edit, the form does not show up the Multiselect optionset (choices).

Bulk Edit Multiselectoptionset/choices fieldsusing Microsoft Power Automate

How we can then achieve this?

If we search for this over the internet, we will find that we need to create an on-demand Workflow with custom assembly to update the Multiselect optionset field. Custom workflow assembly because again Multiselect optionset fields does not show up in Update record properties form of the Workflow step.
Finally, I am able to achieve this using Power Automate Flow. Let us see how you can bulk edit Multiselect optionset fields using Power Automate Flow.

• Go to https://make.powerapps.com and create a new “Instant Cloud Flow”

Bulk Edit Multiselectoptionset/choices fieldsusing Microsoft Power Automate

• As we have to run the Flow on the multiple selected records, select the “When a row is selected” from the list of triggers and click on Create.

Bulk Edit Multiselectoptionset/choices fieldsusing Microsoft Power Automate

• This will create a flow that we can run on selected records from Dynamics 365 CRM or CDS/Dataverse environment.

• Select the environment and select the entity where you want to bulk edit the Multiselect optionset field.

Bulk Edit Multiselectoptionset/choices fieldsusing Microsoft Power Automate

• Add a new step and select the “Update a row” action. Using this we will update the current selected record/row.

Bulk Edit Multiselectoptionset/choices fieldsusing Microsoft Power Automate

• After this, select the entity and pass the unique identifier of the record.

Bulk Edit Multiselectoptionset/choices fieldsusing Microsoft Power Automate

• Now, look for Multiselect optionset field from the list of fields. You will see that you can only select one option at a time. Though it is a Multiselect option, we can only select one option.

In the below screenshot, Operation is the Multiselect optionset field with options as “Create, Update and Read”. We are able to select an only single option.

Bulk Edit Multiselectoptionset/choices fieldsusing Microsoft Power Automate

• To set multiple options, we need to write the expression. Click on “Enter custom value”, this will open up the expression box. Click on “Expression” and enter the following expression, string(0, 1)

Here 0 and 1 are the values of options of the Multiselect optionset field. In my case, 0 and 1 are the option values of Create and Update option respectively. Each option value is separated by a comma ‘,’

Bulk Edit Multiselectoptionset/choices fieldsusing Microsoft Power Automate

Syntax of the expression is, string (<value1>, <value2>, <value3>)

• Save the flow and run it by selecting the multiple records,

Bulk Edit Multiselectoptionset/choices fieldsusing Microsoft Power Automate

Conclusion

This way we can easily edit Multiselect optionset fields by using Power Automate Flow.
Hope this helps! Thank you!

kanban board

Leave a Reply