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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Attachment is not uploaded

(0) ShareShare
ReportReport
Posted on by 48

Hi All,

 

I have a powerapps for leave req submission, previously it works just fine. But now the attachment section is not linking to the sharepoint. So every time someone submit the form, the attachment is not send eventhough the person already upload it. And it always show unsaved, is there any correlation? Any kind of help is appreciated, thanks!

 

safiranrd_0-1712894937674.png

 

I did not change any formula on my submit button its always been like this 

Patch(
 ListLeaveRequestbyUser,
 Defaults(ListLeaveRequestbyUser),
 {'Leave Type':Gallery2.Selected.'Leave Type'.Value},
 {'From Date':StartDate.SelectedDate},
 {'To Date':EndDate.SelectedDate},
 {'Number of Leaves Day':daysdiff+1}, 
 {'Name (Title)':DataCardValue1.Text},
 {'Employee No.':DataCardValue4.Text},
 {Department:DataCardValue6.Selected},
 {Company:DataCardValue7.Selected},
 {Position:DataCardValue8.Text},
 {Attachments:DataCardValue13},
 {'Name Manager':DataCardValue5.Selected},
 {LeaveID:{'@odata.type':"#Microsoft.Azure.Connectors.Sharepoint.SPlistExpandedReference", Id:Gallery2.Selected.ID, Value:Gallery2.Selected.Title}}); 
 Notify("Leave Applied Successfully",NotificationType.Success); 
 Navigate('My Leave Request');
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    151,686 Most Valuable Professional on at
    Re: Attachment is not uploaded

    Hi @safiranrd ,

    It should not have worked in the first place as you cannot Patch Attachments like that. The only way is to use the Attachment Control with either SubmitForm() or Patch(YourFormName.Updates)

     

    Please click Accept as solution 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 giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • safiranrd Profile Picture
    48 on at
    Re: Attachment is not uploaded

    Hi

     

    Im sorry but if I want to use the Patch(YourFormName.Updates) formula do i need to erase the whole existing formula? or its an additional formula? please guide me thanks!

  • WarrenBelz Profile Picture
    151,686 Most Valuable Professional on at
    Re: Attachment is not uploaded

    @safiranrd ,

    Yes (replace), but you would need to add the items that are not sourced from the Form. You would also need to ensure that your Data Card Update setting on each card reflected what you have in the Patch.

     

    Please click Accept as solution 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 giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • safiranrd Profile Picture
    48 on at
    Re: Attachment is not uploaded

    @WarrenBelz ,

     

    I tried using the formula but the edit button wont work and it shows this error 

    safiranrd_0-1712902032460.png

     

  • WarrenBelz Profile Picture
    151,686 Most Valuable Professional on at
    Re: Attachment is not uploaded

    @safiranrd ,

    You need the list you are patching to

    Patch(
     ListLeaveRequestbyUser,
     Defaults(ListLeaveRequestbyUser),
     'Form Request'.Updates
    )
  • safiranrd Profile Picture
    48 on at
    Re: Attachment is not uploaded

    @WarrenBelz 

     

    Tried the formula, the attachment is still not showing. There is this unsaved note in the attachment box, is there any issue that correlating with this unlinked attachment issue? 

    safiranrd_0-1712902872567.png

     

  • WarrenBelz Profile Picture
    151,686 Most Valuable Professional on at
    Re: Attachment is not uploaded

    @safiranrd ,

    If you want the attachment to show immediately, use SubmitForm() instead of Patch or set your Form back to View Mode after the Patch. Also the Item of the Form needs to be directly querying your List in both cases.

  • safiranrd Profile Picture
    48 on at
    Re: Attachment is not uploaded

    @WarrenBelz ,

     

    There might be a slight miss understanding, by attachment is not showing I mean is the attachment doesnt flow to the sharepoint. I am new to this powerapps so please bare with me, thanks!

  • Verified answer
    WarrenBelz Profile Picture
    151,686 Most Valuable Professional on at
    Re: Attachment is not uploaded

    @safiranrd ,

    I assumed from the complexity of your posted code that you had a grasp on the principal of writing data from a Form/Controls - I was responding to your posted question regarding the attachment.

    I suggest you use SubmitForm (go back to basics) and it all should save properly.

  • safiranrd Profile Picture
    48 on at
    Re: Attachment is not uploaded

    @WarrenBelz 

     

    Working perfectly, thanks!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard