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 / Multi-Screen form - ho...
Power Apps
Suggested Answer

Multi-Screen form - how to I get the Attachments to patch to an SP List?

(0) ShareShare
ReportReport
Posted on by 19
Here is my Patch function for my Submit button.  How do I get the attachments to patch as well?
 
Patch(
[@'Contracts Database'],
If(IsBlank(SharePointIntegration.Selected),First([@'Contracts Database']),SharePointIntegration.Selected),
{'Vendor Name': DataCardValue1.Text},
{'Internal Contact - Submited By': DataCardValue3.Selected},
{'Internal Contact Name': DataCardValue4.Selected},
{'Internal Contact Email': DataCardValue15.Text},
{'Internal Contact Phone Number': DataCardValue53.Text},
{'Internal Contact - Title': DataCardValue21.Text},
{'Internal Contact - Department': DataCardKey52.Text},
{'External Contact - Submitted By': DataCardValue5.Text},
{'External Contact Name': DataCardValue19.Text},
{'External Contact Email': DataCardValue55.Text},
{'External Contact Phone Number': DataCardValue56.Text},
{'External Contact - Title': DataCardValue18.Text},
{'External Contact - Department': DataCardValue54.Text},
{'External Contact Signatory': DataCardValue20.Text},
{'Contract Type': DataCardValue10.Selected},
{'Contract Category': DataCardValue9.Selected},
{'Funding Structure': DataCardValue2.Selected},
{'Engagement Structure': DataCardValue6.Selected},
{'Grant Period, Installment Schedule and Reporting Requirements': DataCardValue7.Text},
{'Hourly or Lump Sum Rate and/or Not-to-Exceed Amount': DataCardValue8.Text},
{'Arrangement Type': DataCardValue85.Selected},
{'Renewal Options': DataCardValue11.Selected},
{'Grant or Sponsor Requirements': DataCardValue147.SelectedItems},
{'Start Date': DataCardValue12.SelectedDate},
{'Term Date': DataCardValue14.SelectedDate},
{'Term Notice Period': DataCardValue16.Selected},
{'Purpose of Contract': DataCardValue88.Text},
{'Internal Deliverables': DataCardValue89.SelectedItems},
{'External Deliverables': DataCardValue90.Text},
{'Type of Attachment(s)': DataCardValue93.SelectedItems},
{'Other Attachment(s)': DataCardValue92.Text},
{'Attachments': DataCardValue91.},
{'Oversight Authority': DataCardValue13.SelectedItems},
{'Type of Oversight Authority': DataCardValue106.Selected},
{'Regulation': DataCardValue107.Text},
{'Statute': DataCardValue108.Text},
{'Oversight Authority (2)': DataCardValue109.Selected},
{'Type of Oversight Authority (2)': DataCardValue110.Selected},
{'Regulation (2)': DataCardValue111.Text},
{'Statute (2)': DataCardValue112.Text},
{'Oversight Authority (3)': DataCardValue113.Selected},
{'Type of Oversight Authority (3)': DataCardValue114.Selected},
{'Regulation (3)': DataCardValue115.Text},
{'Statute (3)': DataCardValue116.Text},
{'Advancement Review Needed': DataCardValue127.Selected},
{'Human Resources Review Needed': DataCardValue128.Selected},
{'Budget Neutral': DataCardValue159.Selected},
{'Budget Allocation #': DataCardValue130.Text},
{'Finance Sign-off Method': DataCardValue131.Selected},
{'Date of Finance Sign-off': DataCardValue132.SelectedDate},
{'CFO Approval Allocation #': DataCardValue133.Text},
{'CFO Sign-off Method': DataCardValue134.Selected},
{'Date of CFO Sign-off': DataCardValue135.SelectedDate},
{'Legal/Compliance Sign-off Method': DataCardValue156.Selected},
{'Date of Legal/Compliance Sign-off': DataCardValue157.SelectedDate},
{'Operations Sign-off Method': DataCardValue150.Selected},
{'Date of Operations Sign-off': DataCardValue151.SelectedDate},
{'Human Resources Sign-off Method': DataCardValue152.Selected},
{'Date of Human Resources Sign-off': DataCardValue153.SelectedDate},
{'Advancement Sign-off Method': DataCardValue154.Selected},
{'Date of Advancement Sign-off': DataCardValue155.SelectedDate},
{'CEO Sign-off Method': DataCardValue159.Selected},
{'Date of CEO Sign-off': DataCardValue160.SelectedDate},
{'Contract Name': DataCardValue172.Text},
{'Contract Reference ID': DataCardValue173.Text},
{'Execution Date': DataCardValue171.SelectedDate},
{'Processing Time': DataCardValue174.Text},
{'Next Review Date': DataCardValue17.SelectedDate},
{'Notes': DataCardValue176.Text}
)
 
I tried using {'Attachments': DataCardValue91.Attachments} but it doesn't seem to like that.
 
I wanted to use this which creates a new record with the attachments, but doesn't update an existing record.
 
Patch('Contracts Database',Defaults('Contracts Database'),Form1.Updates,Form3.Updates,Form4.Updates,Form5.Updates,Form6.Updates,Form7.Updates)
 
Any help would be greatly appreciated.  Thanks!
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @SJAEMK1

    You cannot patch the SharePoint Attachments column directly in patch function.

    Form’s .Updates property in my Patch statement instead of trying to patch the Attachments field directly. Attachments can’t be patched manually they need to come from the form update record.
    Patch(
        'Contracts Database',
        If(
            IsBlank(SharePointIntegration.Selected),
            Defaults('Contracts Database'),
            SharePointIntegration.Selected
        ),
        Form1.Updates,
        Form3.Updates,
        Form4.Updates,
        Form5.Updates,
        Form6.Updates,
        Form7.Updates
    )
    

    Creating a new record with Defaults() works with attachments, but I need it to update existing records as well.

    Best Practice Recommendation

    Use form control. Since this is a SharePoint-integrated form (SharePointIntegration.Selected), the most stable pattern is:

    SubmitForm(Form1); //Form1 - Replace with your form name
    
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------
     
    📩 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!
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    I will add something to @Kalathiya's correct response (particularly the SubmitForm suggestion) that may be useful when the attachments are on a Form you are also using in the Patch (I assume Form2 ) and you really want for some reason to Patch.
     
    Add another Form (you can hide it) with the DataSource of 'Contracts Database', the Default Mode of New and only an attachment control with the Items of 
    DataCardValue91.Attachments
    Then use that Form reference in the FormName.Updates instead of the one with the other items you are patching (Form2 ). Also you need to watch SharePointIntegrated.Selected - it will not be blank if the user has selected another record before this and not refreshed, so you need to specify if you want new or update - the Form Mode is a better option.
     
    Assuming you use Form8 as the name of the new Form, it would look like this
    Patch(
       'Contracts Database',
       If(
          Form2.Mode = FormMode.New,
          Defaults('Contracts Database'),
          SharePointIntegration.Selected
       ),
       {
          'Vendor Name': DataCardValue1.Text,
          'Internal Contact - Submited By': DataCardValue3.Selected,
          'Internal Contact Name': DataCardValue4.Selected,
          . . . . .
          'Processing Time': DataCardValue174.Text,
          'Next Review Date': DataCardValue17.SelectedDate,
          'Notes': DataCardValue176.Text
       }, 
       Form1.Updates,
       Form3.Updates,
       Form4.Updates,
       Form5.Updates,
       Form6.Updates,
       Form8.Updates
    )
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn   

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