cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Re: Patch Attachments

@v-monli-msft

 

Is it possible to concatenate field value to SharePoint list Attachement filed ??

 

 

Regard's 

attachment.JPG

Highlighted
Helper II
Helper II

Re: Patch Attachments

i didnt understand . ?? How u have patched the attachment if form is in edit more??
Highlighted
Advocate I
Advocate I

Re: Patch Attachments

Can you explain it simpler?
Advocate IV
Advocate IV

Re: Patch Attachments

I encountered this problem as well. I had a form that I could not simply "submit" because of cascading dropdowns and custom data cards. SubmitForm was just not working for me, so I was able to successfully Patch all the values I needed to SharePoint. However, I was unable to upload any attachments with a Patch statement.

 

I came up with this imperfect workaround: I added a second Form to the app. In this Form2, I removed all fields except the Attachment control. (I made sure there were no required fields in SharePoint so that it would not object to having empty fields upon submission.)

 

I placed this Form2 on the app so that it looked just like part of Form1. My Patch statement then concluded with SubmitForm(Form2). So, this works...SORT OF. It actually created my line item with the Patch, then created a second line item with ONLY the Attachments (no metadata values, as expected). Not ideal by any stretch, but at least I could grab the attachments going forward.

 

So then I wrote a Flow that runs on item creation and immediately looks for the condition of Has Attachments = true. If TRUE, then I put all the attachments in an array and email it to the appropriate business person. Then the Flow goes back and cleans up (deletes) the list item that is empty except for the attachments. So the attachments submitted by the user are not associated with the correct line item in the list, but at least the person being notified of the new list item has them. 

 

It's too bad that we have to keep choosing between SubmitForm and Patch. I keep running into dumb little limitations for things that should be simple.

 

Here is the Patch statement I used:

Patch(
    'Standards Requests',
    Defaults('Standards Requests'),
    {
        Title: TitleCardNew.Text,
        DistStandard: DistStandardNew.Value,
        txtDocType: DocTypeNew.Selected.Title,
        txtOwner: OwnerNew.Selected.DisplayName,
        txtDepartment: DataCardValue4.Selected.Result,
        txtProcedure: lblProcedureText.Text,
        Purpose: PurposeNew.Text,
        SummaryOfChanges: SummaryNew.Text,
        txtRequestType: "New"
    }
);
SubmitForm(Form2);
Navigate(CONFIRM);

 

Highlighted
Helper I
Helper I

Re: Patch Attachments

One Year later. Any updates about uploading Attachments  in a Patch function to a SharePoint List?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,732)