Skip to main content

Notifications

Community site session details

Community site session details

Session Id : pwS3i0M4L6HWgythTWNv2B
Power Apps - Microsoft Dataverse
Answered

Attachment file or image column

Like (1) ShareShare
ReportReport
Posted on 15 Mar 2025 02:11:39 by 16
Good evening everyone,
 
I have experienced a little issue when creating attachment column in Dataverse,  automatically it turns Read only column. So, I couldn't patch updates to this attachment column knowing that patch function go through without any error.
 
I created edit form including many items from the Dataverse table + attachment field. All new data are submitted as updates to the row in Dataverse except the attachment.
 
Security role is Administrator.  I am the owner of my environment. Also, I am member in a new role with permissions of read, write .... append on all Dataverse table + Annotation permission as well.
 
Please help.
 
Thank you.
  • Verified answer
    Michael E. Gernaey Profile Picture
    36,268 Super User 2025 Season 1 on 16 Mar 2025 at 06:22:07
    Attachment file or image column
     
    If you want to update an Image / File Column you can in fact use Patch.
     
    But you will need to get the content (whether its the image, or its the file). The best and easiest way to do this is to use the Attachment control, to add the image you want to store (or file).
     
    Then grab the Content and Filename from the Attachment Control, NOT to submit it from the Control.
     
    So essentially you end up with something like this
    Attachment Control called MyAttachments and I'll just assume you have 1
     
    Patch(MyTable, Defaults(MyTable),
        {
           MyAttachmentColumn: 
                 { 
                     FileName: First(MyAttachments.Attachments).Name,
                     Value: First(MyAttachments.Attachments).Value
                 }
        }
    );
     
    Now you can do it without the Control but it does make it easier. Again same for if its a picture but you could be using the Camera Control for instance to grab the data from.
     
    But as the previous poster stated Attachments is  different beast (as actual "notes attachments")
  • Verified answer
    SwatiSTW Profile Picture
    422 Super User 2025 Season 1 on 16 Mar 2025 at 04:34:37
    Attachment file or image column
    Your issue is because Dataverse's Attachment column is stored in the Annotation table, which is a system table that stores file attachments separately from the main record. This results in the attachment field appearing as read-only in Power Apps, preventing direct updates using the Patch() function.
     
    Further, your security role should include Create, Read, Write, Delete, Append, and Append To permissions on the Annotation table.
     
    Since the Patch() function does not work with attachments, you should use a PowerApps Form to handle file uploads.
    Other way round is using Power Automate to upload the file and link it to your record. You may call the Dataverse API to create an Annotation record and link it to your row.
     
  • gates78 Profile Picture
    16 on 16 Mar 2025 at 02:46:59
    Attachment file or image column
    Yes, the notes / attachments are enabled on this dataverse table. the issue is , I am not able to edit the column Attachments because it is read only as follow:
     
  • Michael E. Gernaey Profile Picture
    36,268 Super User 2025 Season 1 on 15 Mar 2025 at 02:39:01
    Attachment file or image column
     
    Please share what you have (don't simply explain it) as we need to validate your configuration, table, expressions, you name it.
     
    Also for attachments are notes etc enabled?

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,513 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,474 Most Valuable Professional

Leaderboard

Featured topics

Loading started
Loading complete