
Notes & Attachments in Dataverse
Notes and Attachments in Dataverse are kind of related to each other. Attachments are used to store files linked to any record e.g. an account or a contact and Notes are used to store notes linked to any record e.g. an account or a contact. Some out-of-the-box tables come with attachments enabled, which in turn enables notes and files. For custom tables, there is an option to enable attachments, which in turns enables notes and files. As you can see from this post, for every attachment, there is a related note. The biggest finding is that the "Id" of the attachment record is the same as the GUID (Note column) of the associated Notes record.
Attachment control
Attachment control is very useful to display attachments and also to allow users to attach/remove files. The attachment control isn't available through the Insert tab in the Power Apps studio. To add the attachment control to the app, follow the steps outlined in this post.
Combining Notes & Attachments in one gallery
Follow these steps to shows them in one gallery:
-
- Add a Vertical gallery
- Change the layout of the gallery to Title or whatever else that is appropriate for your use case
- Set its Items property to
galAccounts.Selected.Notes - Set the Text property of the label to
ThisItem.Title - Add another label below the 1st label
- Set its Text property to
ThisItem.Description - Set its Visible property to
ThisItem.'Is Document' = 'Is Document (Notes)'.No
- Set its Text property to
- Copy the attachment control inside the gallery
- Change its Display mode to View
- Height to 65 (so that there isn't any scroll bar)
- Set Max attachments to 1
- Set its Visible property to
ThisItem.'Is Document' = 'Is Document (Notes)'.Yesso that the attachment control is visible only for notes that are attachments
- Set its Items property to
ForAll( Filter( galAccounts.Selected.Attachments, GUID(Id) = ThisItem.Note ), { Id: PlainText(ThisRecord.Value), Value: ThisRecord.Value, AbsoluteUri: ThisRecord.AbsoluteUri, DisplayName: ThisRecord.DisplayName } )
Here is a quick demo of such a gallery:
As you can see, it takes a few steps but it is possible to create a gallery of notes and attachments together.

3 thoughts on “How to show a combined gallery of notes and attachments”