cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Problem with combination of clearcollect and attachments

I have a form with some strange behavior with attachments.

 

The form is quite easy: a home screen where a user can upload attachments and a viewerscreen where the user can view the uploaded pdf-documents in a gallery. To switch the view the user has to push on a button where a clearcollect will be done with the attachments that are provided and the navigation to the viewerscreen will be done. On that view there is a close button which navigates back to the home screen.

 

I've tested a bit with this and got following results:

Scenario 1:

  • user uploads 2 pdf-documents
  • user clicks on submit --> 2 documents are stored as attachment in the sharepointlist

Scenario 2:

  • user uploads 2 pdf-documents
  • user clicks on "view pdf" --> 2 documents are stored in the gallery and viewable with the pdf-viewer
  • user clicks on close
  • user clicks on submit --> 2 documents are stored as attachment in the sharepointlist

Scenario 3:

  • user uploads 2 pdf-documents
  • user clicks on "view pdf" --> 2 documents are stored in the gallery and viewable with the pdf-viewer
  • user clicks on close
  • user clicks on "view pdf" -->2 documents are stored in the gallery but not viewable in the pdf-viewer
  • user clicks on close
  • user clicks on submit -->no attachments are stored in the SharePoint-list

Does anyone have an idea what could be causing this and how this can be solved?

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Problem with combination of clearcollect and attachments

Hi @FrederikBroux ,

 

Can you take a screenshot of the "view pdf" control? Is it a button control that you customized? By default, I do not see this in an Attachments control.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Problem with combination of clearcollect and attachments

Hi @v-monli-msft,

 

Thanks for getting back at me, the view pdf is just a button which does a clearcollect and navigate to the pdf-viewer screen. That screen consists of 3 controls:

  • gallery with the attachmentcollection
  • pdfviewer (experimental)
  • X-icon to go back to the homescreen.

I've added a screenshot of the homescreen where I add the attachment and a screenshot of the pdf-viewer screen.add-attachment.PNGpdf-attachments.PNG

Highlighted
Advocate II
Advocate II

Re: Problem with combination of clearcollect and attachments

Could you separate the process out and do the ClearCollect on the screen that shows the attachments. On the screen add a timer to allow for the uploads to complete (At this point you could show a loading screen) and then refresh the datasource and grab your records?

Highlighted
Frequent Visitor

Re: Problem with combination of clearcollect and attachments

Hi @DisappointmentB,

 

I've done this and it gives some strange behavior too. If I upload 2 attachments on the first screen it loads ok when going to the 2nd screen where I do the clearcollect now.

If I restart the timerjob again, none of the attachments work anymore.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,902)