cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FrederikBroux
Level: Powered On

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
Community Support Team
Community Support Team

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.
FrederikBroux
Level: Powered On

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

DisappointmentB
Level: Powered On

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?

FrederikBroux
Level: Powered On

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
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,273)