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

Using Multioption Select Lists

Hi,

 

I have a D365 (CDS/Dataverse) field on an entity that supports multiple options to be picked for the field.

 

When I run the flow, the results come back as one big string.  

 

Greggomatic_0-1620229366118.png

Is it possible to have the results come through as an Array?  And/or convert?

 

The next step I want to do is to have an "Apply For Each" action that goes through each value that is retrieved and determines the next action.

 

Is this possible?

 

Thank you - Greg.

3 REPLIES 3
Rilsina
Resolver II
Resolver II

Hi,

 

The Output of Multiselect Option set is in form of comma separated string, you can split it and then use apply to each on the output.

Rilsina_0-1620381488181.png

 

If this post helps, please accept it as Solution.

Hi,

 

Can you share the code for your split function?

 

I have an init variable command and using the following code

 

split(@{outputs('Get_Data')?['body/cs_delivery']},',')

 

However, no matter what I do I always get the following error...

 

The variable 'Channel_Delivery' of type 'Array' cannot be initialized or updated with value of type 'String'. The variable 'Channel_Delivery' only supports values of types 'Array'.

 

Thanks - Greg

@Greggomatic 

Did you initialize your variable as a string or array?

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,154)