web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create multiple new re...
Power Apps
Answered

Create multiple new records in SharePoint at one time

(0) ShareShare
ReportReport
Posted on by 17
 

I am working on an app that allows workers to sign up for specific slots on a specific date.  I have a SharePoint list that stores all of the data.  I want the person creating the slots to be able to designate how many slots they want to create at one time.  So if the person entered 12 it would create 12 slots with the exact same data in the columns identified because later on they will be able to edit those with more specific information.  I have it set that it is able to create one new record at a time but again I want them to be able to create multiple records at one time.  I have researched how to do for loops using powerapps using collections but I am unable to figure out again to limit the number of rows in the collection to the number the staff identify.  Any help would be appreciated.  

Capture.PNG

Categories:
  • KrishnaV Profile Picture
    5,023 on at

    Hi @JSawyer ,

     

    Unfortunately, there are no loops in Power Apps. However, we have a great workaround for everything. follow the below article to implement looping in Power Apps.

    https://www.dynamicpeople.nl/en/news/while-loop-powerapps/

     

    Please don't hesitate to ask me back if you see it is not clear to you.

     

    I hope this resolved your issue if you see any challenge let me know I am always happy to help.

     

    Regards,

    Krishna
    If this post helps give a 👍 and if it solved your issue consider  Accept it as the solution to help the other members find it more.

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @JSawyer ,

    Do you want to create multiple Slot records once time based on the entered number within the TextInput Box?

     

    Based on the needs that you mentioned, I think the ForAll function and Patch function could achieve your needs. Please consider take a try with the following workaround:

    Set the OnSelect property of the "Submit" button to following:

    ForAll(
     FirstN([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25, ...., 98, 99, 100], If(IsBlank(SlotNumberTextInput.Text), 1, Value(SlotNumberTextInput.Text))),
     Patch(
     'Your SP List',
     Defaults('Your SP List'),
     {
     Title: "Slot Create For " & User().FullName,
     Status: StatusComboBox.Selected,
     Date: DatePicker1.SelectedDate,
     'Half day time period': HalfDayTimePeriodComboBox.Selected
     }
     )
    )

    Note: The SubmitForm function could not achieve your needs.

     

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

  • Verified answer
    JSawyer Profile Picture
    17 on at

    So this is what I put in the OnSelected for the submit button:

     

    orAll(
    FirstN([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25], If(IsBlank(TextInput1.Text), 1, Value(TextInput1.Text))),
    Patch(
    'Red Team Sign up',
    Defaults('Red Team Sign up')
    {
    Status: StatusComboBox.Selected,
    Date: DatePicker1.SelectedDate,
    'Half day time period': HalfDayTimePeriodComboBox.Selected
    }
    )
    )

     

    I am getting an error Unexpected Characters.  The formula contains 'ParenClose' where 'CurlyOpen' is expected.  Any thoughts?

  • KrishnaV Profile Picture
    5,023 on at

    Hi @JSawyer ,

     

    Try this it is just formatting issue and syntax issue:

    ForAll(
     FirstN(
     [
     1,
     2,
     3,
     4,
     5,
     6,
     7,
     8,
     9,
     10,
     11,
     12,
     13,
     14,
     15,
     16,
     17,
     18,
     19,
     20,
     21,
     22,
     23,
     24,
     25
     ],
     If(
     IsBlank(TextInput9.Text),
     1,
     Value(TextInput9.Text)
     )
     ),
     Patch(
     'Employee Details',
     Defaults('Employee Details'),
     {Title: "Sample"}
     )
    )

    I hope this resolved your issue if you see any challenge let me know I am always happy to help.

    Regards,

    Krishna
    If this post helps give a 👍 and if it solved your issue consider  Accept it as the solution to help the other members find it more.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard