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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (1,363)