cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jasin_geo
New Member

Attachment card not updating on powerapps

Hi all,

I am trying to develop an app with the possibility to upload photos from PowerApps to SharePoint directly and through the Attachment card. I followed a tutorial made by Reza Dorrani showing this possibility (link to the video : Power Apps Save Pictures to SharePoint - Camera Control Tutorial - YouTube). and I saw lots of comments saying that it is working for them. Unfortunately this is not my case and the attachment card when it is reset to create a new form it is not updating the list from the gallery anymore and it is just showing empty. In the following link i made a video describing the different steps and showing the issue (https://youtu.be/mSnB78bhiBQ).

your help is highly appreciated

thanks 

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @Jasin_geo ,

I did a blog on a similar process a couple of months ago - there may be something helpful in there.

 

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.

Dear @WarrenBelz , many thanks for your reply and the time to look after my request,

I tried to apply the steps you are describing but i feel that i am still beginner and not able to apply that solution properly to my case. a step by step way would be easier for me to understand. For example, when i am copying the formula for OnSelect Cam the "camAttach.Stream" is showing error and do not know why. Same for "acPhotos.attachment" i am struggling to know from where this came.

Hi @Jasin_geo ,

Those are simply two control names I used camAttach is the Camera and acPhotos is the Attachment control. Yours will have different names - you just need to replace these with yours. If you are new to Power Apps, you need to take a little time to understand what is happening. I don't think I can break down the steps any more than I have in the blog.

 

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.

crdawson
Helper I
Helper I

I just had the exact same issue (from the same video tutorial) and found the solution. It is covered in Warren's blog post, you need to set the Items attribute of the Attachment Control to you collection of Attachments. So for the app you posted in your video, DataCardValue30_1.Items needs to be set to ColImages.

 

Was banging my head against the wall for a while with this one, thanks for the blog post @WarrenBelz!

FZKHAN
New Member

I have been stuck for one week but found a quick shortcut for this issue. If you Alternate between ViewForm and Edit Form and back to ViewForm the AttachmentControl would referesh. 

I put on the label in DataCard to count the number of items in the collection or
attachmentcontrol.Attachments. It was showing the attachments count correct but not refreshing.
The workaround I discovered was to after ClearCollect on the collection of attachments I selected a button in the form control which just reset AttachmentControl.
After this I applied ViewForm to the form, then edit form and then again ViewForm (for Viewing Option) or EditForm > ViewForm and then Again EditForm for Editing option. 

ClearCollect(colTestAttachments,galTestList.Selected.Attachments);
Select(btnResetAttachments);
ViewForm(FormAnalysis);EditForm(FormAnalysis); ViewForm(FormAnalysis)

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,806)