Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Display all attachments from dataverse table in form

(0) ShareShare
ReportReport
Posted on by 12

I have a new form in powerapps which is created on top of the dataverse table. I am able to attach multiple attachment to the attachment column and submit the record. 

I have another screen to view the created records but in the view forms, I am able to see only the last single  attachment. Is it possible to view all the attachments in the form view mode? I only managed to create following formula in default property of Attachment field but it shows only last attachment uploaded. How I can iterate through attachments? 

 

//Creates table to display all attachments

Spoiler (Highlight to read)
If(!IsBlank(ThisItem.Attachments.FileName), Table({DisplayName: ThisItem.Attachments.FileName, Value: ThisItem.Attachments.Value}), Blank())
If(!IsBlank(ThisItem.Attachments.FileName), Table({DisplayName: ThisItem.Attachments.FileName, Value: ThisItem.Attachments.Value}), Blank())

 

 

  • Verified answer
    Re: Display all attachments from dataverse table in form

    Hi @jakub_mar ,

     

    I think you just need to add the attachment card, and the app will generate the formula automatically.

     

    vxiaochenmsft_0-1717572278811.png

    vxiaochenmsft_1-1717572292582.png

    vxiaochenmsft_2-1717572307831.png

    vxiaochenmsft_3-1717572319172.png

     

    Best Regards,

    Wearsky

  • jakub_mar Profile Picture
    jakub_mar 12 on at
    Re: Display all attachments from dataverse table in form

    Hi Wearsky,

     

    Thank you for your support. I see right now that relation to the table with attachment has been made when I enabled attachments in my table. However, how should I modify my formula to display all attachment on the form based on this relationship made?

     

     

     

    jakub_mar_0-1717571256249.png

     

    //Creates table to display all attachments
    If(!IsBlank(ThisItem.'Attachments (jm_attachments)'), Table({DisplayName: ThisItem.'Attachments (jm_attachments)'.FileName, Value: ThisItem.'Attachments (jm_attachments)'.Value}), Blank())

  • Re: Display all attachments from dataverse table in form

    Hi @jakub_mar ,

     

    The file column can only store one attachment instead of multiple attachments. 

    I believe you have uploaded multiple files in the attachment control when you used app, but it will actually only add one of the files when you click on the submit button.

    If you want to save multiple attachments, please turn on enable attachment setting for the table.

    vxiaochenmsft_0-1717554810553.png

    Then the attachments will then be stored in the note table associated with your table.

     

    Best Regards,

    Wearsky

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,304

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard