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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / patch form not updatin...
Power Apps
Unanswered

patch form not updating all fields in SharePoint

(0) ShareShare
ReportReport
Posted on by 11

I am using the following formula to submit a form and then patch attachments. However, several fields are not being populated on the submit, or are being cleared by the second patch function. How do I correct?

 

Set(varRecord,If(
Form1.Mode = FormMode.New,
Patch('GPFS Continuous Improvement', Defaults('GPFS Continuous Improvement'), Form1.Updates),
Patch('GPFS Continuous Improvement',Gallery1.Selected, Form1.Updates)
)); If(!IsBlank(varRecord),
Notify("Your request has been submitted! (ID: "& varRecord.ID &")", NotificationType.Success),
Notify("Your request was Not submitted", NotificationType.Error)
);

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @holland1994 

    When you say Form...are you referring to an EditForm?  If so, then you should be using the SubmitForm function on your form rather than patching.

    In your case, your submit should be :

      SubmitForm(Form1)

    In the OnSuccess of Form1 you should have:

       Set(varRecord, Self.LastSubmit); Notify("Your request has been submitted! (ID: "& varRecord.ID &")", NotificationType.Success)

    In the OnFailure of Form1 you should have:

      Notify("Your request was Not submitted", NotificationType.Error)

     

    Also, the Item property of your Form1 should be : Gallery1.Selected

     

    I hope this is helpful for you.

     

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @holland1994 

    Were you able to work through your issue or do you still need help?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard