cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
om3r
Helper I
Helper I

Choice column copying all values into destination list - Power Automate Flow

I have created the Source list and Destination list and want to copy the Choice column with its values to the destination list. I have created a flow that looks like this:

 

om3r_0-1653826823927.png

 

 

om3r_1-1653826910987.png

 

om3r_2-1653826966856.png

om3r_3-1653827028840.png

om3r_4-1653827094910.png

 

The flow is running successfully, however, in the destination list it is capturing all the values of the choice column and all the rows. The results look like this:

 

om3r_6-1653827259902.png

 

 

om3r_5-1653827231959.png

 

Can someone please help me why it is happening like this? What am I doing wrong? Is my flow not correct?

 

Any help would be much appreciated!!

 

Kind regards,

Omer

 

 

 

 

 

9 REPLIES 9
rickdg
New Member

I saw this and thought "Hey I think I know the answer"

When configuring your choice, you have three choices as to what to display to the user. DropDown, Radio boxes, and checkboxes. I'm guessing you picked the checkboxes, because they are a multi-value selection. So, when you use that one the field that is bound to it will create a list of all the selected values from the checkboxes.

 

om3r
Helper I
Helper I

This is how my column listing looks:

 

om3r_0-1653854199381.png

 

When I am copying the items from the source list, I have only selected two options out of 4 and when getting copied to the destination list, it should display only the selected options. Rather, in each row, it is displaying the selected options for all the rows and repeats the same for every row

Turn off the Allow Multiple selections.

I need that column to have the option of multiple-choice selections. Turning it off will not allow that

Rhiassuring
Resident Rockstar
Resident Rockstar

Your flow is a bit off. I always recommend naming your labels - it'll help you see where there's cross over. 


Right now what you're telling it to do, based on your flow above, is to loop through every item and append every choice made across all items into a single array. 

Then, in your second loop, you're telling it to the array to every item you create. 

 

My guess is that you're referencing this blog which is a great one, but it's for a single item creation.


Let's try this instead: 

 

Step 1 & 2 - You've already done perfectly; Get Items (filtered if need be), and Initialize your array for your multi-choice. 


Step 3 - Create Item. (We're going to do this in a slightly different order, just to get rid of confusion with the Apply to Each.) In your Apply to Each, populate all the non-multi-choice values from the other. Watch it turn into an Apply to Each before your very eyes.



Step 4 - Append to Array. Create it below the Create Item, and then drag the Create Item below it. In your Append to Array action, name is your initialized Array, and then when you choose Value, if you type the word "value" into your dynamic content, you should see "YOURCOLUMNNAME value". Select that. Add the array-stuff around it And - boom - another apply to each automatically appears. This time, in the right spot. 

 

Rhiassuring_1-1653883655318.png

 

Step 5 - You can now put your Array into your Create Item (since it's below it!)  

 

Rhiassuring_2-1653883719516.png

 

And you might think that's the last step, but, there's one more very important step since you're creating multiple: 

 

Step 6: CLEAR YOUR ARRAY.  Use a "Set Variable", point it at your arrChoices, and set it to [].

Otherwise, your loop will keep on packing in every choice value through each iteration.

 

Here's the whole flow: 


Rhiassuring_3-1653884052854.png

 

om3r
Helper I
Helper I

@Rhiassuring Thank you for helping me out. I have a few questions about how you created this flow and will share my results by following your inputs.

 

In your suggestion of Step 3 & Step 4

 

(Step 3 - Create Item. (We're going to do this in a slightly different order, just to get rid of confusion with the Apply to Each.) In your Apply to Each, populate all the non-multi-choice values from the other. Watch it turn into an Apply to Each before your very eyes.
Step 4 - Append to Array. Create it below the Create Item, and then drag the Create Item below it. In your Append to Array action, name is your initialized Array, and then when you choose Value, if you type the word "value" into your dynamic content, you should see "YOURCOLUMNNAME value". Select that. Add the array-stuff around it And - boom - another apply to each automatically appears. This time, in the right spot. )

 

This is how my STEP 3 looks when creating it:

 

-After filling in the Title, it collapsed and I clicked on Create Item again, I filled the box "Select output from previous step" with  "value" from Dynamic content.

Step3_1Step3_1Step3_2Step3_2

 

I couldn't get what you meant by this "In your Apply to Each, populate all the non-multi-choice values from the other. Watch it turn into an Apply to Each before your very eyes."

 

In STEP 4, I created Append To Array below the Create Item and tried dragging Create Item below Append To Array, however, it didn't let me do that and gave an error.

 

Step4_1Step4_1Step4_2Step4_2 

 

 

So I Deleted Create Item from the above, as I deleted it,  - just above the Append to array variable, "Select an output from previous steps" went blank and I filled it in with "value" from Dynamic content.

 

Step4_4Step4_4Step4_5Step4_5

 

In your Step 4 "Select that. Add the array-stuff around it And - boom - another apply to each automatically appears. This time, in the right spot." - I Didn't get it.

 

I then proceeded with Steps 5 & 6

 

Step 5&6Step 5&6

 

After the flow was created, I tested it out, it ran successfully. However, in the results in the destination list, I didn't get any values for my Choice column.

 

successful flowsuccessful flowresultsresults

This is what the final flow after completion looks like:

 

FinalFinal

 

Please help me out! I'd highly appreciate your help.

om3r
Helper I
Helper I

I edited the same flow again, and changed the values in Append to array variable  - In "Select an output from previous steps" I changed it to "RSVP" and in the "Value" to "RSVP Value".

 

When I first created the flow, I had correct values as you can see from the previous screen shots

Previous SSPrevious SS

 

However, after the flow ran, it got changed to just "values"

after flow ranafter flow ran

 

Now in the destination list, the results of each row are summed up and recorded in the first row of the list

 

Destination ListDestination List

om3r
Helper I
Helper I

Can some one please help me on this

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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 Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,439)