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 / Download all attachmen...
Power Apps
Answered

Download all attachments for a specified set of records

(0) ShareShare
ReportReport
Posted on by 373

Hi,

 

I've got a Dataverse table containing details of items of equipment. Each record has a file attachment column which contains the certificate to say that the item has been tested.

 

How would I be able to allow a user to download all of their relevant file attachments in one go? Copilot suggests using a Download function inside a ForAll, but I need the Absolute URI for each attachment and I'm having a hard time with that.

 

thanks,

 

Martin

  • Verified answer
    AhmedSalih Profile Picture
    6,680 Moderator on at

    Hello, @Martin_W, I am assuming you are using a Canvas app as your front-end application for your end-users. You can achieve this using the ForAll and the Download function as the Copilot said 🙂

     

    Here is the construction of your URL:

    Download("EnviromentURL/api/data/v9.0/Table_LogicalName(Record_GUID)/FileColumnLogicalName/$value")
     


    If my reply helped you, please give a 👍 If it solved your issue, please give a 👍 & accept it as the Solution to help other community members find it more.

    Visit my Blog: ahmedsalih.blog

    Visit my YouTube Channel: https://www.youtube.com/@powerplatformplace/videos

  • Martin_W Profile Picture
    373 on at

    thanks @AhmedSalih 

     

    Inside a ForAll loop, how would I get the record GUID? Is It ThisRecord I need to be using?

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @Martin_W, the GUID is save in the Column with your table name. So, ThisRecord.ColumnName

  • Martin_W Profile Picture
    373 on at

    Great, thanks again @AhmedSalih 

     

    I've tried that and the first result opens a browser tab with the url (replace EnvironmentURL with my actual Environment URL) which results in a HTTP 401 error

     

    "EnviromentURL/api/data/v9.0/crbbc_leapsasset(784adb72-681d-ed11-b83d-000d3ab351db)/crbbc_declarationofcompliance/$value"

     

    It comes from this code:

    ForAll(Gallery1.AllItems,
     
     Download("myurl.crm4.dynamics.com/api/data/v9.0/crbbc_leapsasset(" & ThisRecord.LEAPSAsset & ")/crbbc_declarationofcompliance/$value")
     )

     

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    @Martin_W, your Organization URL needs : https://

     


     

    If my reply helped you, please give a 👍 If it solved your issue, please give a 👍 & accept it as the Solution to help other community members find it more.

    Visit my Blog: ahmedsalih.blog

    Visit my YouTube Channel: https://www.youtube.com/@powerplatformplace/videos

  • Martin_W Profile Picture
    373 on at

    Thanks, I have that:

    Martin_W_0-1710080897334.png

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard