web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Problem with combinati...
Power Apps
Unanswered

Problem with combination of clearcollect and attachments

(0) ShareShare
ReportReport
Posted on by 23

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?

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    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

  • FrederikBroux Profile Picture
    23 on at

    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 Profile Picture
    61 on at

    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 Profile Picture
    23 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard