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 attachment field
Power Apps
Unanswered

Patch attachment field

(0) ShareShare
ReportReport
Posted on by 726

I have app with 10 fields at the end of the app i run a patch on submit - 

 

Patch('Vehicle Check', {ID: Blank()}, FirstFields.Updates, SecondField.Updates, ThirdField.Updates, FouthField.Updates, FifthField.Updates, SixthField.Updates, SeventhField.Updates, EighthField.Updates, NinthField.Updates, TenthField.Updates);Navigate('Thank You', ScreenTransition.None) 

 

The problem i'm having is that most of the forms i need attachments, i would like to see all the attachments added in each field form once submited at the moment it will only display the last photo attached, All the others get removed. 

 

How do i achive this? 

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

    Hi @amyharkus86 ,

    I think the formula that you listed is a little strange.

    Firstly, Updates is the form's property. Data card's property is Update.

    Secondly, the Patch function's right syntax is:

    Patch(tablename,item,{...})            //item shoule be the item that you want to update

    Patch(tablename,Defaults(tablename),{....})       

    While what you use is: {ID: Blank()}, this can not represent an item.

     

    I assume that you want to create a new record, try this formula:

    Patch('Vehicle Check',Defaults('Vehicle Check'),Form1.Updates)

    What's more, the Attachments field's setting inside the form is also important.

    Here's my setting for your reference:

    Set the attchments data card's Update: DataCardValue8.Attachments

    8194.PNG

     

     

    Best regards,

  • amyharkus86 Profile Picture
    726 on at

    I've changed my path to reflect your 

     

    Patch('Vehicle Check',Defaults('Vehicle Check'),Form1.Updates) 
    Patch('Vehicle Check',Defaults('Vehicle Check'),FirstFields.Updates, SecondField.Updates, ThirdField.Updates, FouthField.Updates, FifthField.Updates, SixthField.Updates, SeventhField.Updates, EighthField.Updates)

    This is a lot cleaner and works as required, Thank you. 

     

    The problem i have with attachments still remains, 

     

    On my first field input screen 'firstfield'

    It picks up the first name and last name two fields i have in sharepoint list, I then have added the attachment field, If i take a photo on the app this shows in my sharepoint list as expected and the details all show as i would like. 

     

    screenshot1.JPG

    I then have a second form page with called 'secondfield' on another page on the app

    this has more fields from the same list vehicle make, model, fleet number and these update the sharepoint list as i would like. 

    I've again added the same attachment field

    When i take a photo or add an attachment from the second field it updates the form and removes the attachment made in the 'firstfield', What i would like is to be able to add an attachment on firstfield and another on the second, Not replacing the first attachment made in the firstfield but as an additional attachment. 

    screenshot2.JPG

     

    first attachment field on firstfield has Update: DataCardValue70.Attachments 

    second attachment field on secondfield has Update: DataCardValue71.Attachments 

     

    I've tried putting them both as Update: DataCardValue71.Attachments i get the same results only one attachment shows in my sharepoint list

     

    screenshot3.JPG

    Is there away of instead of updating the attachment field it combines all the attachments from all the editforms to the same attachment field?

     

    I know there is currently no way to have more then one attachment field but if there is away to combine all them that would work for my situation. 

     

    I see the question of adding more attachment fields has been asked mutiple times but this is an example of it 

    https://powerusers.microsoft.com/t5/General-Discussion/Create-multiple-Attachments-in-single-powerapp-screen-and-share/td-p/201231 

    Although this would be better, A solution work around for me would be to combine all attachments to the one field with in sharepoint, is this possible? 

     

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

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard