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 / Change In Patching/Sub...
Power Apps
Unanswered

Change In Patching/Submit Form Behavior

(0) ShareShare
ReportReport
Posted on by 6

I have been developing an app in powerapps that works as following.

 

1. I submit form 1 using SubmitForm( ). (I do this in order to submit my form with an attachment first)

2. I get the Latest ID for form 1 using LastSubmit.ID 

3. Now that I have my form submitted with an attachment, and I have the latest ID, I can Patch the remaining fields from a second form.

 

 

This functionality was working in version 3.18112.22 but has completely broken down in version 3.18114.25.

Steps 1 and 2 are working but my Patch function is passing blank values. I can pass hardcoded values. 

 

Any thoughts or ideas as to what might be occuring would be greatly appreciated.

 

Session ID: 69dc99ec-0bb2-4ca6-9015-b8325ae37461
PowerApps 3.18114.25

 

Categories:
I have the same question (0)
  • v-sheyu-msft Profile Picture
    Microsoft Employee on at

    HI @srubio24,

    Can you share a bit more details about your issue?

    Can you show your formula of patch function?

    Can you show me details of patching fields?

     

    I made a test. there is no issue on my side.

    10.PNG

    Set the onsuccess property of editform1 to:

    Patch(test3,EditForm1.LastSubmit,{column1:"22221"})

    Regards,

    Eason

  • srubio24 Profile Picture
    6 on at

    Hi, Here is the code for my patches. This is my onSelect button code.

     

    If(
     IsBlank(Comments.Text),
     Notify(
     "Please Complete All Required Fields *",
     NotificationType.Error
     ),
     Patch(
     Record,
     Defaults(Record),
     {
     RecordComments: Comments.Text
     }
     );
     Patch(
     'Log',
     Defaults('Log'),
     {
     ActivityComment: Comments.Text
     }
     )
    )

     

    The Comments.Text field is in a gallery window.  If I were the flop the order of the patch. for example, Patching to the Log list first, then to the Record List, then both are patched correctly.

     

    If I keep the code in this order the patch to the record list always works but the patch to the Log is cleared, and patches in the default value for that item in the gallery.

     

     

    Similarly this is occurring with Forms. Form A submits a new record to the Record list. The record is patched successfully.

     

    But after the submit my fields in Form B are cleared and nothing is patched.

     

     

     

    SubmitForm(FormA);
     Set(
     lastID,
     FormA.LastSubmit.ID
     );
     Patch(
     Record,
     First(
     Filter(
     Record,
     ID = lastID
     )
     ),
     {
     RecordComments: FormBcomments.Text
     }
     )

     

     

     

  • srubio24 Profile Picture
    6 on at

    Upon further testing a better explanation of what appears to be happening is as follows:

     

    1. I load data to a gallery. 

    2. I update the data in the gallery.

    3. I patch the gallery two two places. 

     

    Results:

    The patch works for the first list. But after that the fields in the gallery are reset to the default values that were there prior to my updates. THese default values are then patched to the second list.

  • cronem Profile Picture
    2 on at

    I have been experiencing the same problem with the data not completely writing to all of the columns in my 2nd list too. I have done a lot of reseaching and found your blog post.

     

    The LastSubmit function in PowerApps (release 3.19045.16) isn't working as expected. I have followed the video instructions for building a "PowerApps Repeating Tables like InfoPath (Part 1)" from MVP Shane Young.

    (https://www.youtube.com/watch?v=xgznk4XlPCo&list=PLCGGtLsUjhm2bonhBZuEhZU72QkFjOpc6&index=35)

     

    I have many different iterations (310 times over a course of 3 weeks) using Collect, ForAll, Patch, UpdateContext, and hard coded variables with the Form1.LastSubmit.ID as a text (Title column) and number (ReportID) value. I also tried the code in the Form "OnSuccess" and Save Button "OnSelect". It will save the data to the master list (Bird Report) just fine but it will not copy all the data to the detail list (BirdBrain) as demonstrated in the PowerApp video. I have ran into these two scenarios.

     

    1. I can get the other columns to popular in the detail list (BirdBrain) except the ReportID and Title columns.
    2. I can get the ReportID and/or Title columns to popular in the detail list (BirdBrain) except other columns are now blank.

     

    I have tried for 3 weeks to get all the columns to popular in the detail list (BirdBrain). I sent my notes to Microsoft and gave them the reference link to this blog post too.

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
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard