Hi all,
im using Join action with JSON expression to map Multiselect option set but it throws an error saying invalid integers
Please look the below pics and advice on this.
Solved! Go to Solution.
You can use the same approach to update the record using values from your MS Form.
See: Re: Get Dataverse Choices with Label and ID(Value) - Power Platform Community (microsoft.com)
Here is an example based on the linked post:
You can hard code each of the option set values into a variable of type (JSON) object. The text in the JSON object must match EXACTLY what you have in used in your MS Form for the options:
{
"Green Apple": 544500000,
"Blush Pear": 544500001,
"Baby Banana": 544500002,
"Honey Dew Mango": 544500003
}
The Select actions takes the question "Choose one or more fruits" as its input (From). The From field uses an expression which converts the "Choose one or more fruits" response from MS Forms (which is a string!) into an array of JSON objects. You will need to wrap your question within the json action:
Finally, we can update the field usng the output from Join action
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hi @Sk365 ,
With Datavese you can't use and assign the text descriptions for a choice field :
"Physical Therapy",
"Speech Therapy",
"Outpatient Mental Health Therapy"
Dataverse assigns an integer value for each choice option and you will need to find and use those values in the Add a row action.
For example, I want to update a row and change the choice of fruit to Apple and Mango. The field name I need to change is FruitChoice (in the Dataverse table the field's actual name is crc37_fruitchoice). I need to find the integer values for Apple and Mango:
The browser will open or switch to Power Apps:
Unfortunately the option set values are displayed with commas:
These are the integer values for choice of fruit I extracted:
"Apple" = 544500000
"Pear" = 544500001
"Banana" = 544500002
"Mango" = 544500003
In the Update a row action below, I added fruit choice Mango and Apple:
This the the runtime action:
This is the updated record:
For more information, see (the screens shots may be a bit out of date):
Re: Get Dataverse Choices with Label and ID(Value) - Power Platform Community (microsoft.com)
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hello @ekarim2020
I tried it and it worked some how.
but the issue in here is the value needs to be read from the Microsoft forms. When a form is filled it should read the response and create a record in contacts. If I put the integer values dynamically in the response action, it’s directly giving all the options available on the field I only need the options the I select
hope you got my point
You can use the same approach to update the record using values from your MS Form.
See: Re: Get Dataverse Choices with Label and ID(Value) - Power Platform Community (microsoft.com)
Here is an example based on the linked post:
You can hard code each of the option set values into a variable of type (JSON) object. The text in the JSON object must match EXACTLY what you have in used in your MS Form for the options:
{
"Green Apple": 544500000,
"Blush Pear": 544500001,
"Baby Banana": 544500002,
"Honey Dew Mango": 544500003
}
The Select actions takes the question "Choose one or more fruits" as its input (From). The From field uses an expression which converts the "Choose one or more fruits" response from MS Forms (which is a string!) into an array of JSON objects. You will need to wrap your question within the json action:
Finally, we can update the field usng the output from Join action
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hello @ekarim2020
Tried what u said and it still shows the error “ not valid integers”.
I used Initialize variables then next select and later Join action. In join action the output is showing as value instead of text but when I update the join output in the required mapped field is shows the same error not valid integers.
Apologies @ekarim2020
I haven’t used “Switch map to text mode” step in the Select action, So it throwed me the error. Now it’s working fine
Thanks a lot and what can I say for your help. Man you saved my time and life, I was struggling on this from few days. Thanks a lot again and again
Hi @Sk365 ,
Can you share screenshots of your flow, including the details in variable, select and join actions.
You can capture the screens using: Use Snipping Tool to capture screenshots (microsoft.com)
or you can use Edge's built in screen capture:
Ellis
Hi @ekarim2020
Actually we are not authorised to use any other browser or mail or site in the company provided laptop, So as why I’m using the snapshot via mobile.
here is the SS of my flow which u asked for
Thanks a lot….
Glad it's now working!
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.