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 / Patch multiple record...
Power Apps
Answered

Patch multiple records using a Nested ForAll

(0) ShareShare
ReportReport
Posted on by 262
Hi All,
 
I have two collections, Vehicles and Countries.  I want to create records to a Sharepoint List
 
Vehicles : Car A, Car B
Countries : Country A, Country B
 
The result I would like is below
 
Record       Vehicle         Country
1               Car A            Country A
2               Car A            Country B
3               Car B            Country A
4              Car B             Country B
 
I was looking at using a Nested For All, but I am not able to get it to work
 
Thank in Advance
Categories:
I have the same question (0)
  • Verified answer
    Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @Skybluekid,
     
    Please try below code: 
     
    Assuming:
    Vehicles has a column called Vehicle
    Countries has a column called Country
     
    ForAll(
        Vehicles As _vehicalObj, //Vehicles - Collection name
        ForAll(
            Countries As _countryObj, //Countries  - Collection name
            Patch(
                YourSharePointList,  //Replace this "YourSharePointList" your sharepoint list..
                Defaults(YourSharePointList),
                {
                    Vehicle: _vehicalObj.Vehicle,
                    Country: _countryObj.Country    //Update column name "Country" as per your list column name        
                }
            )
        )
    )
    
    I have already tested this using dummy collections and stored the output in a temporary collection, and the results are coming back as expected.
     
     
     
     
    ------------------------------------------------------------------------------------------------------------------------------------------
     
    If this solution fixed your issue, please mark it as the verified/accepted solution.
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping.
     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard