cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
WarrenBelz
Super User
Super User

Hi @Anonymous ,

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?

 

Anonymous
Not applicable

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. 

OK thanks @Anonymous ,

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

Anonymous
Not applicable

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. 

 

Hi @Anonymous ,

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,510)