cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NigelP
Kudo Kingpin
Kudo Kingpin

Can Collections have Attachments

Hi

 

I have a SHArePoint list which has attachments.

 

If I do a ClearCollect(mycollection, sharepointlist); where do the Attachments go ?

 

I use collection externsively to get round the SharePoint DElegation issues.

 

Can I acces them from the collection ?

 

Thanks

 

Nigel

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @NigelP,

Do you want to pull the SP List attachments into a collection using the ClearCollect function?

 

I have made a test on my side, if you want to pull the SP List attachments into a collection using the ClearCollect function, I afraid that there is no way to achieve your needs within PowerApps currently.

 

Currently, we could only access the SP List item attachments within the Attachments control of a Edit form. More details about the Attachments control within PowerApps, please check the following article:

Attachments control

 

Best regards,

Kris

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.

View solution in original post

7 REPLIES 7
LanceDelano
Power Apps
Power Apps

Clearing the collection simply clears the internal memory list.  It's when you do the submit or patch that the data source is updated.  If the submit/patch delete the list item or record, the attachments should go as well.  The attachments are stored in the SharePoint database.  When you enable attachments for a SharePoint List (or CDS entity) a separate table is activated for your List.  The list of attachments keeps a field that points to the record you are storing in your list.   Try a small example and check the SharePoint list to see what happens.

v-xida-msft
Community Support
Community Support

Hi @NigelP,

Do you want to pull the SP List attachments into a collection using the ClearCollect function?

 

I have made a test on my side, if you want to pull the SP List attachments into a collection using the ClearCollect function, I afraid that there is no way to achieve your needs within PowerApps currently.

 

Currently, we could only access the SP List item attachments within the Attachments control of a Edit form. More details about the Attachments control within PowerApps, please check the following article:

Attachments control

 

Best regards,

Kris

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.

View solution in original post

Thanks @v-xida-msft

Anonymous
Not applicable

Hi @v-xida-msft ,

I am trying to display items in a gallery using ClearCollect, to workaround the SP's delegation issues.

In this Gallery, I have another Gallery made to display the first attachment of thisItem.

I've worte in 2nd_Gallery.Items "First(ThisItem.Attachment)" and in the image into that gallery, the Image property is set to ThisItem.AbsoluteUri.

This works pretty well when 1st_Gallery's items is directly pulled from the SP list (with a simple SortByColumns(Annonces,"Modified",Descending) ).
But when I changed my 1st_Gallery'items to colItemsFiltered, i lost my attachments because we can't store any attachment's details into a collection.

 

Do you know any workaround on this ?

 

Thank you .

Anonymous
Not applicable

Have you figured this out? I am having the same issues. 

VaidasG
Frequent Visitor

Same issue here;

Has anyone came up with a solution?

Hi -- I also ran into this issue and my workaround was as follows: instead of trying to pull images from the "Attachments" column in the collection, I created a hyperlink column called "Attachment_URL" that stores the link to the attached image. This column is populated by patching the URL to the attachment after every successful form submit (OnSuccess property). 

 

Then, set the gallery Image property to ThisItem.Attachment_URL, and the image should appear. This works because while you can't collect Attachments you can collect hyperlinks to them. Hope this helps!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,350)