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

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
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,540)