cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alex69570
Regular Visitor

issue with multiselect integer values

Hi !

 

I have a flow who get multiselect values from a powerapps app, parse the values in JSON and create a string with the values to  update Dynamics.

 

When I run the flow, I've got an error because my option set is not a valid integer.

I supposed last week that the issue was the comma or semicolon separator between values so I tested with values directly in the field and it worked !

But when I put a variable instead of the values, I still have an error message.

 

image.pngimage.png

 

Does anyone has an idea ?

 

Thank you,

 

Alexandre

4 REPLIES 4
EricRegnier
Super User
Super User

Bonjour @alex69570,

The issue seems to be because the content set on the field/column is a string of the concatenated multi-select item values which is how Dataverse stores the selections in the table. You'll need to split the string and traverse the individuals values as need be. Here's an example:

I'm using the split function and compose action

EricRegnier_0-1614631392822.png

Hope this helps!

 

 

dpoggemann
Super User
Super User

Hi @alex69570,

 

This is a great article I actually used to do the same thing with updating a Choices (multi-select option set) value in the Common Data Service (Dataverse) - Too many name changes! 😁. The connector is not the Common Data Service (current environment) connector, it is the legacy Dynamics 365 one, but it is basically the same process...

 https://www.endeavour365.ca/use-flow-to-update-a-multi-select-option-set/

 

Hope this helps.


Thanks,


Drew

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew
alex69570
Regular Visitor

Hi !

@EricRegnier  & @dpoggemann 

Thanks for your responses.

 

Unfortunatly, I still have the same issue with string/integer format.

 

@EricRegnier  with your solution I managed to split the string but when I update the values in my destination I have backslash in my code (I don't know if it's ok) and the flow consider the values as string. 

 

alex69570_0-1614681066316.png

 

image.pngimage.png

 

@dpoggemann when I tried the example you sent me, I have an error in step 4 regarding the fact that I have a string (the value from 'compose' in the example) and an integer (the value from 'compose 4') in my condition and it's impossible for power flow to execute the condition.

 

I may have missing something but I don't see what.

Do you think I made something wrong ?

Do you have any idea on how I can fix this issue ?

 

Thank you both,

 

Alexandre

Hi @alex69570, apologies for my delayed response. You're almost there! For the backlashes, how are you concatenating the different values? You can't directly concat from the compose. What I generally do is:

  1. Initialize a string variable, that will hold the concatenated multiselect values to update later (e.g. "4343376,4343377")
  2. As you loop through the logic, you append the multiselect value with the CONCAT expression and "Set Variable" action.. E.g. 
    concat(variables('multiselect'), ',', ....)
    Make sure the first append is the variable itself not the lose the previous value, and also ensure to have some check conditions not to append an empty/null string. Ex:
    2021-03-07_8-50-54.png
  3. Finally when done, update the field/column

Hope this clarifies...

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (5,413)