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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Attachments from Canva...
Power Apps
Answered

Attachments from Canvas App to Model Driven App.

(0) ShareShare
ReportReport
Posted on by 228

Overview:

I have a solution using a Dataverse table, Power Pages for request forms, and a model-driven app to manage service lines. We are transitioning from Power Pages to a Canvas app to leverage its flexibility for enhanced functionality and visual design.

Context:

We’re starting with a My Requests view in the Canvas app, which allows users to:

  • View the status of their submitted requests.
  • Make modifications if the request hasn’t already been assigned.

One anticipated need is for users to add additional attachments to existing requests. Currently, attachments are handled using the Notes (Annotation) table in Dataverse. Based on my research, the relationship between the Intake Request table and the Notes table is maintained via the Regarding column in the Notes table.

Problem:

When I inspect the Notes table, the Regarding column is blank for all entries. Despite this, attachments are still visible on the related records in the model-driven app. I am unable to determine how this association is being established by the developers who originally configured the solution using Power Pages.

In my Canvas app, I have an Attachment control that allows multiple files. However, when I attempt to attach a file and save the form, the file doesn’t appear in the expected location. Instead, in the Intake Request table, I see an attachment icon with a GUID value, but I can’t trace where the actual file is stored or how it’s linked.

Goal:

I need to replicate the existing attachment behavior from Power Pages in my Canvas app. I want any additional attachments uploaded via the Canvas app to appear correctly in the Notes section of the related Intake Request record in the model-driven app.

In the screenshot below, the existing attachment (uploaded on 11/6) is visible, but the new attachment I attempted to add today (11/18) is missing. My goal is for both files to show up here consistently.

Request:

I know this is a lot of information, but I hope someone can help guide me in the right direction. How can I ensure that attachments uploaded via the Canvas app are properly linked to the Intake Request and appear as expected in the model-driven app?

I have the same question (0)
  • Verified answer
    MichaelFP Profile Picture
    1,847 Super User 2025 Season 2 on at
    Hi!
     
    In the notes (Annotation) table the field that is related to parent table is the ObjectId (logical name), so you need to set this field to link.
     
    Another thing is that the file is saved as base64 into the column documentbody, you need on your canvas app to set this column to able to save the note from canvas app and to be visible in model driven app.
     
    Patch(Notes,Defaults(Notes),
    {
        Title: "New File",
        Regarding: First(Accounts),
        'Is Document': true,
        'File Name': "image.png",
        'Mime Type':"image/png",
        Document: "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAAKYB3X3/OAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAANCSURBVEiJtZZPbBtFFMZ/M7ubXdtdb1xSFyeilBapySVU8h8OoFaooFSqiihIVIpQBKci6KEg9Q6H9kovIHoCIVQJJCKE1ENFjnAgcaSGC6rEnxBwA04Tx43t2FnvDAfjkNibxgHxnWb2e/u992bee7tCa00YFsffekFY+nUzFtjW0LrvjRXrCDIAaPLlW0nHL0SsZtVoaF98mLrx3pdhOqLtYPHChahZcYYO7KvPFxvRl5XPp1sN3adWiD1ZAqD6XYK1b/dvE5IWryTt2udLFedwc1+9kLp+vbbpoDh+6TklxBeAi9TL0taeWpdmZzQDry0AcO+jQ12RyohqqoYoo8RDwJrU+qXkjWtfi8Xxt58BdQuwQs9qC/afLwCw8tnQbqYAPsgxE1S6F3EAIXux2oQFKm0ihMsOF71dHYx+f3NND68ghCu1YIoePPQN1pGRABkJ6Bus96CutRZMydTl+TvuiRW1m3n0eDl0vRPcEysqdXn+jsQPsrHMquGeXEaY4Yk4wxWcY5V/9scqOMOVUFthatyTy8QyqwZ+kDURKoMWxNKr2EeqVKcTNOajqKoBgOE28U4tdQl5p5bwCw7BWquaZSzAPlwjlithJtp3pTImSqQRrb2Z8PHGigD4RZuNX6JYj6wj7O4TFLbCO/Mn/m8R+h6rYSUb3ekokRY6f/YukArN979jcW+V/S8g0eT/N3VN3kTqWbQ428m9/8k0P/1aIhF36PccEl6EhOcAUCrXKZXXWS3XKd2vc/TRBG9O5ELC17MmWubD2nKhUKZa26Ba2+D3P+4/MNCFwg59oWVeYhkzgN/JDR8deKBoD7Y+ljEjGZ0sosXVTvbc6RHirr2reNy1OXd6pJsQ+gqjk8VWFYmHrwBzW/n+uMPFiRwHB2I7ih8ciHFxIkd/3Omk5tCDV1t+2nNu5sxxpDFNx+huNhVT3/zMDz8usXC3ddaHBj1GHj/As08fwTS7Kt1HBTmyN29vdwAw+/wbwLVOJ3uAD1wi/dUH7Qei66PfyuRj4Ik9is+hglfbkbfR3cnZm7chlUWLdwmprtCohX4HUtlOcQjLYCu+fzGJH2QRKvP3UNz8bWk1qMxjGTOMThZ3kvgLI5AzFfo379UAAAAASUVORK5CYII="
    });
     
     
    If you are using Form control, you can easily link with note using the attachment control include to manage the attachments
     
     
    If my answer helped you, please give me a thumbs up (👍). If solve your question please mark as answer ✔️. This is help the community.
     
  • Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    I'm not sure what happened to my first post--It looked like it went through but now it's gone.

    My first comment would be, are you sure you need to handle this in a Canvas App?  It might actually be easier to make a Model-Driven App to handle note and file uploads.  You can also consider having the canvas app pop open a link to the record's form in a model driven app once they get to the step where files can be uploaded--or an email with the link can be sent.

    Regarding some of your questions:
     
    1.
    When I inspect the Notes table, the Regarding column is blank for all entries.
     
    This is because the Regarding column is not a normal lookup column, it's a special polymorphic and you can't use it in a list view.  However, if you open the note record in a Model-Driven App form you'lll see the "Regarding" field on the form and it will be populated.




    Please note, you can create a Model-Driven App view that does show what record your notes are linked to by looking up the name field of the related regarding table in the "Related" columns tab of the view editor.



    If you filter on this column so that only records with it populated show up, you will only see notes that have been uploaded to the specific table you want.  In this example, I'm using Contacts.


     
     
    2.  Using Annotations in Canvas Apps

    You can view file attachment notes in the "Attachments" card on the form of your select record, you can also filter all notes them into a gallery 

    In this example I'm filtering notes on Contacts into the gallery:

    Filter
    (Notes,AsType(Regarding,Contacts).Contact = vSelContact.Contact)

    If you want to limit it to only file upload notes, you can filter on "Is Document".

    You can also follow Michael's suggestion on how to upload a file and patch it to a note in Power Apps, but in practice I've found just using Model-Driven Apps or Portal Pages work better for uploading a file to the Notes table.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard