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

Collections is not empty, when it should be...sometimes

I have an application that collects photos into a collection. However, sometimes the gallery of photos is pre-populated with empty pictures. This isn't always the case, but it has happened enough where it seems to be a bug of some sort. The functionality of my app is to choose some kind of a location ID, then go into a form that has you take photos and uploads them. However, if I'm someone who first enters this location ID, I shouldn't be seeing photos already. I have a delete functionality, so it just has a trashcan next to all these blank photos. I've tried to "Clear" my collection every time I select a new location, but this bug keeps occuring even after that change. Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Collections is not empty, when it should be...sometimes

Hi @pwrapps_intern ,

How do you collect the images into a Collection within your app? Using Camera control to capture pictures?

Could you please share more details about the formula you used to capture the images captured via Camera control?

 

Based on the needs that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The App's configuration as below:3.JPG

 

4.JPG

Set the OnSelect property of the Camera control to following:

Collect(CapturedImages, Camera1.Photo)

Set the Items property of the Gallery to following:

CapturedImages

 

In addition, I also made a test on my side, if you type above Collect formula within the OnSelect property of another Button control rather than within the OnSelect property of the Camera control itself, the CapturedImages collection would contains empty record.

So please do not type your Collect formula within the OnSelect property of another button control, instead, you should type it within the OnSelect property of the Camera control itself.

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Collections is not empty, when it should be...sometimes

@pwrapps_intern 

 

You can clear clear the collection either on Page "OnVisible" or App "OnStart" to clear out all the photos. If you have any control that will affect this collection, you can modify the OnChange property.
 
One thing, though these blank image with trashcans appears when there is no picture captured on camera but it is collected in the collection. Can you please confirm all the formula that are collecting this collection is getting triggered when not required? If so, we may need to redefine the formula for it. Please share a bit more information about how you are trying to collect this collection, maybe through some snippet/screenshot?
 
Hope  this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Community Support Team
Community Support Team

Re: Collections is not empty, when it should be...sometimes

Hi @pwrapps_intern ,

How do you collect the images into a Collection within your app? Using Camera control to capture pictures?

Could you please share more details about the formula you used to capture the images captured via Camera control?

 

Based on the needs that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The App's configuration as below:3.JPG

 

4.JPG

Set the OnSelect property of the Camera control to following:

Collect(CapturedImages, Camera1.Photo)

Set the Items property of the Gallery to following:

CapturedImages

 

In addition, I also made a test on my side, if you type above Collect formula within the OnSelect property of another Button control rather than within the OnSelect property of the Camera control itself, the CapturedImages collection would contains empty record.

So please do not type your Collect formula within the OnSelect property of another button control, instead, you should type it within the OnSelect property of the Camera control itself.

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

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