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.
Solved! Go to Solution.
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:
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:
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:
Best regards,
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
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:
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:
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:
Best regards,
User | Count |
---|---|
140 | |
133 | |
79 | |
75 | |
74 |
User | Count |
---|---|
210 | |
200 | |
71 | |
66 | |
55 |