cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gatchaman
Frequent Visitor

Adding multiple rows with the same flow (Excel)

Hello,

I am having a bit of trouble with one of my flows.

I have a form in PowerApps I use to add lines to an Excel file.

The onSelect Runs the flow in wich I put all the values for columns 

Gatchaman_0-1645608739952.png

No Issue so far the flow works fine and adds the line.

 

My issue:

I need to add duplicates of the submited lines. Instead of adding one. I need to add as many as selected in this field here.

Gatchaman_1-1645608958084.png

Say for example the user fills the form and puts a 3 in this field. I need the flow to add the line 3 times instead of one as it does now.

 

I am having a few things I don't understand:

The first is how do I send the value of that field with the flow.

if I simply add it with the rest I will logically get an error

 

Gatchaman_2-1645609229592.png

It will be an invalid number of arguments as this field has no corresponding column in the datasource and is not passed in the connector.

Gatchaman_3-1645609594813.png

The other question would be

How do I use this value to indicated how many rows to add

I assume I would add an action using Control and forEach but it's a bit fuzzy.

I would appreciate any pointer, thank you very much!

 

1 REPLY 1
mattias1172
Responsive Resident
Responsive Resident

I'm not familiar enough with PowerApps to advise on how to get the number value, but if you can get it and set a variable such as "Counter" equal to that number, you can use a "Do until" action with the "Counter" variable. 

mattias1172_0-1645650204329.png

A setup similar to this where you have the "add a row" action and you decrement the "Counter" variable on each run.

mattias1172_1-1645650333518.png

 

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,725)