I have a New Item form that a user fills out and enters a quantity into a text box.
The form should create N number of identical items into a SharePoint List based off the quantity box.
The submit icon uses the following OnSelect:
ForAll(FirstN([TextInput1.Text, 1,2,3,4,5,6,7,8,9,10]),Patch('General Inventory',Defaults('General Inventory'),{Title: DataCardValue5_1.Text,Barcode: DataCardValue6_1.Text,User: DataCardValue9.Selected,Notes: DataCardValue8_1.Text,Attachments: DataCardValue14}));Back()
Only a single item is created in the SharePoint list, however.
Done. Thanks for your time.
If they both worked you have the ability to select two answers 🙂
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Thank you both for the suggestions! They both work like a charm!
You could use the SEQUENCE function. By using SEQUENCE you do not have to pre-define the number range. The user can add as many new items as they like.
ForAll(Sequence(Value(TextInput1.Text)),Patch('General Inventory',Defaults('General Inventory'),{Title: DataCardValue5_1.Text,Barcode: DataCardValue6_1.Text,User: DataCardValue9.Selected,Notes: DataCardValue8_1.Text,Attachments: DataCardValue14}));Back()
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi,
You almost had it, try this:
ForAll(FirstN([1,2,3,4,5,6,7,8,9,10],Value(TextInput1.Text)),Patch('General Inventory',Defaults('General Inventory'),{Title: DataCardValue5_1.Text,Barcode: DataCardValue6_1.Text,User: DataCardValue9.Selected,Notes: DataCardValue8_1.Text,Attachments: DataCardValue14}));Back()
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399