cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
diegoaff92
Helper III
Helper III

Show Attachments in a gallery

Hi everyone,

 

I've a question, how can i put attachments in a gallery. I don't want to update an attached, just see and download, as a single link, the data of the attached.

 

For example.

 

Captura.PNG

There is a column with the name, attachemnts. I just want to see the name of the attached were is update in mi SP list.

 

Is it possible?

 

I'm going to waiting for your comments.

 

Best regards.

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @ganeshsanap,

 

Thank you for your soon reply. When i tried to put "ThisItem.Attachments" (in spanish will be "ThisItem.Datos Adjunto") it doesn't exist, and in my SP list i have the column "Attachments" - "Datos Adjuntos" with data.

 

Captura.PNG

I'm going to wiating for your coments.

 

Best regards.

 

View solution in original post

Hi @ganeshsanap;

I made a huge mistake, it wors, the problem, my gallery work with a collection that is connected with my SP list, the think is, i dont understand why it doesn't collect my attachments.

 

ClearCollect(ColecciónNPNF; AddColumns('NPNF prueba'; "Seleccionado"; false));;Refresh('NPNF prueba')

That it's my collection.

 

Search(
    Filter(
    ColecciónNPNF;
    If(Dropdown3.Selected.Value = "-Seleccionar-";
    true;
    Resultado = Dropdown3.Selected.Value);
    If(Dropdown3_3.Selected.Value = "-Seleccionar-";
    true;
    Estado = Dropdown3_3.Selected.Value)
    );
    Searchbox.Text;
    "Title";
    "Responsable";
    "Responsable2"
)

This is my gallery code.

 

Do you knowe how can i collect attachments in my collection.

 

Best regards

View solution in original post

6 REPLIES 6
ganeshsanap
Super User
Super User

@diegoaff92 , Will there be only one attachment to list item or multiple attachments?

 

For only one attachment:

Add a button in your gallery and use below formula on OnSelect:

 

Launch(First(ThisItem.Attachments).AbsoluteUri)

 

 

For multiple attachments per list item:

  • Add a new gallery within your existing gallery and associate its Items property with ThisItem.Attachments
  • Within this new gallery you can use  ThisItem.DisplayName and other properties to show data
  • To download an attachment add a button within this new gallery and use Launch(ThisItem.AbsoluteUri)

ReferenceShowing attachments from a Sharepoint List 


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

Hi @ganeshsanap,

 

Thank you for your soon reply. When i tried to put "ThisItem.Attachments" (in spanish will be "ThisItem.Datos Adjunto") it doesn't exist, and in my SP list i have the column "Attachments" - "Datos Adjuntos" with data.

 

Captura.PNG

I'm going to wiating for your coments.

 

Best regards.

 

View solution in original post

Hi @ganeshsanap;

I made a huge mistake, it wors, the problem, my gallery work with a collection that is connected with my SP list, the think is, i dont understand why it doesn't collect my attachments.

 

ClearCollect(ColecciónNPNF; AddColumns('NPNF prueba'; "Seleccionado"; false));;Refresh('NPNF prueba')

That it's my collection.

 

Search(
    Filter(
    ColecciónNPNF;
    If(Dropdown3.Selected.Value = "-Seleccionar-";
    true;
    Resultado = Dropdown3.Selected.Value);
    If(Dropdown3_3.Selected.Value = "-Seleccionar-";
    true;
    Estado = Dropdown3_3.Selected.Value)
    );
    Searchbox.Text;
    "Title";
    "Responsable";
    "Responsable2"
)

This is my gallery code.

 

Do you knowe how can i collect attachments in my collection.

 

Best regards

View solution in original post

@diegoaff92 , As per below link (which is very old), there is no way to pull the SP List attachments into a collection. Currently, we could only access the SP List item attachments within the Attachments control of a Edit form.

 

Can Collections have Attachments 

 

Also, check this video if it helps you: https://www.youtube.com/watch?v=Ds9yJZD6PVU 


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

Hi @diegoaff92 ,

Do you want to collect the Attachments from your SP List into a collection?

 

Actually, it is a known issue within PowerApps app -- when collecting SP List records into a collection, it would not collect the Attachments column value from SP List.

 

Currently, If you want to collect the Attachments column value from your SP List into a collection, I afraid that there is no way to achieve your needs.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, you could consider add an nested Gallery inside your current existing Gallery, then set the Items property of the nested Gallery to following:

LookUp('Your SP List', ID = ThisItem.ID).Attachments

Set the Text property of the Label inside the nested Gallery to following:

ThisItem.DisplayName

8.JPG

 

If you want to download corresponding Attachment file from the nested Gallery, you could consider add a "Download" icon inside the nested Gallery, set the OnSelect property to following:

Download(ThisItem.AbsoluteUri)

9.JPG

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi @v-xida-msft ,

 

Thank you for your soon reply, I resolved my problem, but could be a great idea to add in collections attachments.

 

Best regards.

 

Diego F.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (42,582)