Forum Discussion

JimJ2380's avatar
JimJ2380
Copper Contributor
Oct 01, 2024

How to patch attachments into a SharePoint list

I have a new form (Form1) that has all my fields contained. I can patch these fields into a new record and it works fine. Now I want to patch a second form (Form2), which contains attachments, into the same record. I have found several advise pages that say to use "Form2.Updates" in my patch function.

i.e. Patch(SharePointList,Defaults(SharePointList),{FieldName: DataCardValue1.Text},Form2.Updates

Here is the code:

Patch(
    'SOW Requests',
    Defaults('SOW Requests'),
    {SOW_Name: DataCardValue27.Text},   
    {'Estimated Cost':Value(DataCardValue14.Text)},
    Form3.Updates
)

The "Form3.Updates" is showing as an error. Any suggestions?

1 Reply

  • PKHong5279's avatar
    PKHong5279
    Copper Contributor

    Hi

    Patch( 'SOW Requests', Defaults('SOW Requests'),

    {SOW_Name: DataCardValue27.Text,

    'Estimated Cost':Value(DataCardValue14.Text)}, 

    Form3.Updates

    )

     

    Please amend to
    Patch(Datasource,

        {Field1: Value1,

        Field2: Value2},

    EditFormName.Updates

    )

    TQ and Have a nice day

     

Resources