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 / Display attachment fil...
Power Apps
Unanswered

Display attachment files or url on Form Reload

(0) ShareShare
ReportReport
Posted on by 443

Hello,

Lets say i have a form and i use the attachments control to upload files to SharePoint. I have copied the attachment control and paste  it to another Datacard which has an input field (Hyperlink).

in this field i display the url of the uploaded file (i ve created a Flow). That works perfectly so far. Now,

when a user reloads the app, and chooses the edit form, i want that url, or the file/s attached to be dispalyed.

I m not sure how to achieve this.

Any suggestions?

 

Categories:
  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @marial16 ,

    What do you mean by "displayed" (an image in a control)?

  • marial16 Profile Picture
    443 on at

    I mean the files as already uploaded by the user (they appear to be unsaved)

    nnnnnnnnnnnnnnnnnnnnnnn.png

    Or in the  Hyperlink DataCard, text input where i display the url.

    kkkkkkkkkkkkkkkkk.png

    If the user reenters the form, how can he see that information?

  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @marial16 ,

    Two things,

    • Until the form is saved by SubmitForm(), these attachments do not "reside" anywhere other than references in the control.
    • There is no ability to reference a particular item (other than specifically First and Last) in the attachments by referencing the control itself (there is no .Selected property).

    However, one saved, every file has a reference AbsoluteUri which is the link to the item you are after, so the first item referenced within the form would be

    First(ThisItem.Attachments).AbsoluteUri

    If you have two, you could reference the other one with Last.

    A further option for you is a gallery - with the Items (replace with your name)

    YourAttachmentControlName.Attachments

    Then in the individual records of this (which are your attachments), you can have the Link reference as 

    ThisItem.AbsoluteUri

    and also an Image Control for pictures

    ThisItem.Value

    and for the file name

    ThisItem.DisplayName

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • marial16 Profile Picture
    443 on at

    I am not sure i understood how the Absolute.uri works.

    inside the data card i added a gallery, where i display the file name and the url i have built in my flow and retrieved (ask-respond to powerapps).

    So in the Gallery.Items: Attachments5.Attachments,

                                         Field1: ThisItem.Name,

                                         Field2: myVariable.fileLink 

    uuuuuuuuuuuuuuuuuuuuuuuuu.png

    The next time the user enters the form can the name and/or url be prepopulated?

    I have also initialized a var to check if the file in the Attachment5 will be displayed.

    Attachment5: onAddFile:Set(Set(onAddAnother,true);ClearCollect(myDeliverableFiles,Attachments5.Attachments)

    Attachments5: Items: If(onAddAnother=true,myDeliverableFiles,Parent.Default)

     

     

  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @marial16 ,

    You have a gallery, (but only have one attachment in the example below).

    ThisItem.AbsoluteUri

     will get you the full path to open the file. If you only have one, then

     First(Attachments5.Attachments).AbsoluteUri

    will get it as well without the gallery. However, if your question is pre-population after loading but before saving, then no, you will not get the AbsoluteUri until it is saved.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @marial16 ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • marial16 Profile Picture
    443 on at

    Thank you for asking,

    I followed a different approach. 

     

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 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard