Hi All,
I've been looking for a solution for this issue and can't seem to find one. I'm using power automate to create a new record in my dataverse when a Form submission is received. Part of the form is a multiselect box where the user can choose the areas the supplier will work with. I need this to then populate the Multiselect/Choices field my dataverse table to use within a model driven app.
I know that choice fields use a value when assigning using Power Automate. But I can't figure out how to reference each field get the correct value and then add that to a string that will then created the record. Is there a way to reference the choices column list out all the choices match them and then get the values? I've tried building it in Power Automate and creating an array with all the choices and values but when it tries to select it just returns all values in the array.
Is there a better way to do this?
Solved! Go to Solution.
Hi @mousman85 , @takolota , @ChrisPiasecki
Did any of you receive an error message when trying to update the CDS/Dataverse multi select field with multiple values? I keep getting an error message that the values I am providing are not valid integers.
To prevent the error message, I then created an array of valid integers:
This I created by using replace() to replace the labels of the user selected input from MSForm, with the corresponding multi select code (numeric) values. After using replace() to remove all the quotes and square brackets, I split the resultant output into an array of numeric codes. I then used int() to append to a second array - thus ensuring that the second array is one of only valid integers. No error messages so all looking good and the output from a test run looks clean too.
Now I have to convert this array of integers into something that Dataverse will accept for the multi select field. Have tried updating the multi select field with output from two compose functions using the integer array:
Neither of these result in output which Dataverse will accept. Here is the error message:
"The optionset values sent [948170000,948170001,948170002,948170003,948170004,948170005,948170006,948170008,948170010] are not valid integers."
Any ideas? Can't find any solutions which work on any platforms.
I tried many options suggested on this Forum and only one solution worked for me in the case of a user submitting a MS Form with multi-select options (for Communication Channels in this case). The requirement was to update a Dynamics solution table field or column with the all the options selected by the User.
Here is the solution which ran successfully:
1. The first step was to replace all the labels selected by the user in the Form with the number values required for Dataverse:
User | Count |
---|---|
19 | |
9 | |
8 | |
5 | |
5 |
User | Count |
---|---|
32 | |
29 | |
18 | |
18 | |
6 |