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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Entering Notes and Att...
Power Apps
Unanswered

Entering Notes and Attachments to Custom Table - Info, Not Question

(2) ShareShare
ReportReport
Posted on by 345

Not a question, but something I thought might help others.

 

I have a custom table, and when creating a new record users need to have the ability to add a note and attachment(s). Once the record is submitted, it is read-only, so I have to gather everything prior to submitting the record. I am using the Dataverse Notes and Attachment tables.

 

I struggled with how to do it for a day or so, but here's how I did it:

  1. Enable Notes and Attachments on the custom table
  2. Create a text box for the note text
  3. Add an EditForm with only "Attachments" as described here.
  4. Change the "Item" property on the EditForm to the below. See here as to why. 

 

If(IsBlank(lPatchRecord), Defaults(CustomTable), lPatchRecord)​

 

  • When submitting, use Patch as described in Step 3. 

 

UpdateContext(
 {
 lPatchRecord: Patch(
 CustomTable, 
 Defaults(CustomTable),
 {
 <fields here>
 },
 frmAttachments.Update
 )
 }
)​

 

  • Now that you have a record, Patch your Note. Optionally, add error trapping prior so you know if the record was created, notify the user, etc.

 

If(
 !IsBlank(txtNoteText.Text), 
 Patch(
 Notes, 
 Defaults(Notes),
 {
 Title: NoteTitle,
 Regarding: lPatchRecord,
 Description: txtNoteText.Text,
 'Is Document': false
 }
 )
)​

 

  • Something I did not know until today, when you add a record to the Attachments table it also adds a record to the Notes table. So when I come back to the screen to view my Note, I thought the code would be First(lPatchRecord.Notes).Description. But no! Because I added the Attachment first, I had to use Last(lPatchRecord.Notes).Description.

Hope this helps someone down the road.

Categories:
I have the same question (0)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard