Dataverse multiselect choice column type metadata has labels and corresponding integer values. While labels are used for the user interface, internally the system uses the corresponding integer values. Integrating services/systems are also required to use the integer values.

For example, the Dataverse Connector requires integer value inputs while creating or updating records that has multiselect choice columns values.

Screenshot 1:

This integer input requirement could make it challenging to author and maintain your Flows when the source system is only providing the labels and does not have the integer values. For example, The Microsoft Forms only has text labels. In such scenarios, you can hard-code the integer values mapped to the text labels while creating or updating records in Dataverse from the Flow, but hard coding is not ideal.

The Dataverse Web API can come in handy, using which you can retrieve the complete metadata. Below are the request and response examples in screenshot 2 and 3.

 Screenshot 2:

Screenshot 3:

As you can see, the Web API response has much more information along with the label and the integer value for each value in the Choice column. You can use choice options from the response body by using the expression:  body('Invoke_an_HTTP_request_-_Get_Choices')?['Options']

and put it through an ‘Apply to each’ loop:

Screenshot 4:


Inside the loop, parse the option as JSON so subsequent action(s) can refer the Value and the Label. You can generate the schema using one of the option objects from the response body.

Screenshot 5:


The next action is to append the Label and the Value from the “Parse Current Choice JSON ” output of the current item using these expressions; refer to screenshot 6 for visual.



Screenshot 6:

Upon loop completion, the “choicesMetadata” array looks like screenshot 7:

Screenshot 7:

I am attaching a sample cloud Flow following the above method. This flow can be triggered manually by providing the API URL and the choice column schema name. When executed, it returns an array which includes the labels and the corresponding integer values that you can consume in your parent flow by parsing it as JSON; like screenshot 8.

Screenshot 8:


Hope this helps!

Bhavesh Shastri