cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
I_Mo
Frequent Visitor

Error on Patch to Dataverse

Hi,

I have this Patch statement which works fine when you write the code fresh, but after a few minutes it goes into an Error state with no further explanation.

The only thing I worked out is if I comment out the the Upload file line, it works fine - but I'm a little confused as to what the problem is.

 

Patch(
    MyTable,
    {MyTable: varRecord.MyTable},
    {
        DataList: DataList.Text,
        UserName: UserName.Text,
        FileUpload: {FileName:First(AttachmentControl.Attachments).Name, Value: First(AttachmentControl.Attachments).Value},
        DateRequired: DataRequired.SelectedDate
    }
)

 

- If I comment out the FIleUpload line, there seems to be no problem.

 

I hope someone is able to help. Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
I_Mo
Frequent Visitor

I've managed to figure it out. Hope the solution below comes handy for others.

 

You must enable the checkbox to allow attachments. The way to go about it in the updated version of Dataverse is as follows:

 

  1. Select the table you want to upload files to.
  2. Click on Properties  from the 'Table Properties' box (top left).
  3. Check the checkbox which says 'Enable attachments (including notes and files)

 

I_Mo_0-1655672599165.png

 

View solution in original post

1 REPLY 1
I_Mo
Frequent Visitor

I've managed to figure it out. Hope the solution below comes handy for others.

 

You must enable the checkbox to allow attachments. The way to go about it in the updated version of Dataverse is as follows:

 

  1. Select the table you want to upload files to.
  2. Click on Properties  from the 'Table Properties' box (top left).
  3. Check the checkbox which says 'Enable attachments (including notes and files)

 

I_Mo_0-1655672599165.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,008)