cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nicola94
Level: Powered On

Adding Rows to Form to batch submit

Hello,

I am working to a prototype for a quote generator.

In the prototype, there is a page which lets you submit a single line quote (i.e: one item), as a form.
I am wondering if it possible to add a button which creates a new row, so that I can create a multi line quote and submit all the lines at once.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Adding Rows to Form to batch submit

Hi  ,

Could you please share a bit more about your scenario?

Do you want to add a button to add a new row, then you could submit multiple lines once time?

 

Based on the needs that you mentioned, I think the combination of Gallery control, Patch function and ForAll function could achieve your needs. I have made a test on my side, please take a try with the following workaround:1.JPG

 

2.JPG

 

3.JPG

 

4.JPG

Set the OnStart property of the App to following:

ClearCollect(CurrentIndex, 1)

Add a Gallery control, set the Items proeprty to following:

CurrentIndex

add some Text Input box within this Gallery to collect user's input.

Add a "+" icon button, set the OnSelect property to following:

Collect(CurrentIndex,1)

Add a "Patch" button outside the Gallery, set the OnSelect property to following:

ForAll(
        Gallery1.AllItems, 
        Patch(
              'YourSPList', 
              Defaults('YourSPList'), 
             {
                Column1: TextInput1.Text, 
                Column2: TextInput2.Text,
                Column3: TextInput3.Text,
                ...
             }
       )
)

Note: The TextInput1, TextInput2, TextInput3, ... represents the Text Input box within your Gallery.

Please check the following GIF screenshot for more details:Test.gif

Please consider take a try with above solution, then check if the issue is solved.

 

Please also check and see if the solution mentioned within the thread would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Save-Multiple-Records-to-SharePoint-List/m-p/...

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
geneZebra
Level 8

Re: Adding Rows to Form to batch submit

I've done it like this in my app:

 ForAll([1,2,3,4],
          Patch(<table>, Defaults(<table>), // Defaults is needed to create a new blank record 
               {ID: Last(<table>).ID + 1,// or you can use Value to use the index into for loop 
               <other field> : <new value> // put in whatever you want to add
               }

          )

);

Note for excel I needed to manuallt create uniques  ID's.

 

Hope this helps.

Gene

 

 

Community Support Team
Community Support Team

Re: Adding Rows to Form to batch submit

Hi  ,

Could you please share a bit more about your scenario?

Do you want to add a button to add a new row, then you could submit multiple lines once time?

 

Based on the needs that you mentioned, I think the combination of Gallery control, Patch function and ForAll function could achieve your needs. I have made a test on my side, please take a try with the following workaround:1.JPG

 

2.JPG

 

3.JPG

 

4.JPG

Set the OnStart property of the App to following:

ClearCollect(CurrentIndex, 1)

Add a Gallery control, set the Items proeprty to following:

CurrentIndex

add some Text Input box within this Gallery to collect user's input.

Add a "+" icon button, set the OnSelect property to following:

Collect(CurrentIndex,1)

Add a "Patch" button outside the Gallery, set the OnSelect property to following:

ForAll(
        Gallery1.AllItems, 
        Patch(
              'YourSPList', 
              Defaults('YourSPList'), 
             {
                Column1: TextInput1.Text, 
                Column2: TextInput2.Text,
                Column3: TextInput3.Text,
                ...
             }
       )
)

Note: The TextInput1, TextInput2, TextInput3, ... represents the Text Input box within your Gallery.

Please check the following GIF screenshot for more details:Test.gif

Please consider take a try with above solution, then check if the issue is solved.

 

Please also check and see if the solution mentioned within the thread would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Save-Multiple-Records-to-SharePoint-List/m-p/...

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,314)