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 / ForAll/Patch to create...
Power Apps
Answered

ForAll/Patch to create multiple records

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

App has a form (Form1) with:

-SP: JobClass_JobSkill

- Dropdown (Dropdown3)-> "Category"

- Text input (Datacardvalue5)->"Job Skill"

-Combobox (Combobox2)m->"Job Classification"

 

I want to create multiple records to the SP list like this:

Category/Job Skill/Job Classification

Maintenance/Training123/Supervisor

Maintenance/Training 123/Associate

Maintenance/Training 123/Technician

 

The Submit button OnSelect syntax is:  ForAll(ComboBox2.SelectedItems.Value,Patch(JobClass_JobSkill,Defaults(JobClass_JobSkill),{Category:Dropdown3.SelectedText.Value,'Job Skill':DataCardValue5.Text, 'Job Classification':Value}));SubmitForm(Form1)

 

It's not writing to the SP list. What am I doing wrong? TIA

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    PowerApps forms are designed to submit a single record. 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@shawnawentz,

    Based on the issue that you mentioned, do you want to create multiple records based on the Combo Box selected items?

    Could you please share a bit more about the scenario?

    I think you should combine the Split() function with the ForAll() function.

    Set the Submit button OnSelect as follows:

    ForAll(
     Split(
     Concat(
     Combobox2.SelectedItems.Value,
     Value,
     ","
     ),
     ","
     ),
     Patch(
     JobClass_JobSkill,
     Defaults(JobClass_JobSkill),
     {
     Category: {Value: Dropdown3.Selected.Value},
     'Job Skill': Datacardvalue5.Text,
     'Job Classification': Table({Value: Result})
     }
     )
    )

    Hope it could help you.

    Regards,

    Qi

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard