cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Attachment control not refreshed

Hi all, 

 

We have a SharePoint customized list form. In this form we an attachment field. 

When users try to upload attachments to current item, the control does not get refreshed and won't show the uploaded files immediately. 

The behavior varies, sometimes it shows the files after a while when we switch back to the attachment screen, but sometimes it doesn't show the files even if we wait for 10 min. 

I tried putting a Refresh(datasource) in my code but didn't help. Even a manual refresh button for testing does not make any difference. 

Only way is to close the form reopen again and we see the changes (not recommended in live env.). This issue has been there for a while now, anybody know when Microsoft team is going to attend this? 

 

Regards. 

5 REPLIES 5
Highlighted
Super User
Super User

Re: Attachment control not refreshed

Hi @NNikumbh ,

I just need to get some things clear in my mind from your description as I have not seen this behaviour from attachment cards before.

Firstly, you describe a SharePoint customised form with an attachment control and then you describe switching back to the attachment screen.

Is the data source of the first Attachment form directly linked to the SharePoint list?

What type of control displays the attachments on the second screen?

 

Highlighted
Helper II
Helper II

Re: Attachment control not refreshed

So there are 5-6 screens (form sections), and attachments is one of them. All of the screens are attached to same SP list data source. Attachment screen has only the attachment card and a custom card for displaying a gallery with some text description for users.

 

Users may switch on any screen while filling the form. Please let me know if any other details needed. 

Highlighted
Super User
Super User

Re: Attachment control not refreshed

OK thanks @NNikumbh ,

Probably the last question is the most important - how do the users see the attachments on the other screen?

Highlighted
Helper II
Helper II

Re: Attachment control not refreshed

Hi Warren, 

 

Attachment control is present on the dedicated documents screen (edit mode) & last review (view mode). 

there is save button on each screen which patches the updates (along with attch.) on documents screen. 

Code for patch: 

Set(patchResult,Patch(SupplierDetails,{ID:lastSubmitID},
NewForm1.Updates,
NewForm2.Updates,NewForm3.Updates,NewForm4.Updates,NewForm5.Updates,NewForm6.Updates));
Refresh(SupplierDetails);

Data from all screens patches properly. but after patch completes, the screen will not show us the documents that are saved to SP. 

 

Highlighted
Super User
Super User

Re: Attachment control not refreshed

Hi @NNikumbh ,

I am not sure how much this helps other than to tell you the following works.

I put two forms on the same data source on two different screens, one in Edit Mode and one in View Mode.

I then added the attachment control and a couple of other fields.

On the Edit screen, I put a save button with the sequence SubmitForm, Refresh Data Source, Navigate to other screen.

I added and deleted about a dozen photos and each time the result was reflected on the second screen.

I see you are using a Patch - how are the attachments updated?

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,826)