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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Batch Patch Error Hand...
Power Apps
Unanswered

Batch Patch Error Handling: Table Batch with erroneous entries returns only the errors

(1) ShareShare
ReportReport
Posted on by 87
Hello,
I am creating a table of records to a sharepoint List in on patch call. This is done using Patch(DataSource, BaseTable , ChangeTable). where BaseTable is Defaults(), The Change Table is made of a ForAll. 
I am having this issue. 
this patch job successful for those good iterations of the forall but skips the erroneous ones. my problem I tried to capture the return table from forall operation but it  only got the errors, I cannot extract the created records from the call itself.
based on documentation: if Error happens in forAll it will return the error but  in this case forall is returning a table and it should return a table with created records along error records for each error happened.

I also would like to note that I cannot separate the forall from the patch they have to be chained for the batch job to work, I could not create variable and pass it in between.
 
Thank you
>>>>>>>>>>>>>>>> more context
Microsoft states in here: https://learn.microsoft.com/en-us/power-platform/power-fx/error-handling if a functions return a table but has errors it will return table of created records along with records who had errors in some of its fields or return the whole record as error: shown below 
The issue: FORALL, is only returning errors but not a table of records along erroneous ones.
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,928 Moderator on at
     
    So its either by design, a bug or a scope issue in the code.
     
    Can you please share your Code
  • ialbasheir-kbr Profile Picture
    87 on at
    Sure here is the what I am doing.. I am basically archiving a list of items into an archive list with extra metadata 
     
    UpdateContext({createdArchs: Patch(
        eLearningArchive,
        ForAll(selected_eLearning,
            {
                List Data
            }
        )
       
    )});
     
    There are multiple things I noticed.. 
    1. This code is works as intended when all the list data are ok
    2. if the forall() has one bad item in it like divide over zero, the patch won't happen, and the returned table has 1 error record.
    3. if the forall() is good, but it passed one bad record within the table to the patch(), it will return a table of created items and I have no data about failed record
    4. I cannot split the forall() from the patch() itself. like putting in a var then pass it to patch(). Powrapps thinks I am doing record to record ops and expecting a record while I am actually doing table to table op

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 211 Super User 2026 Season 1

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard