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

Collection empty after response from

Hi, 

 

I'm taking a picture with powerapps and running a flow and writing back to powerapps.

My flow looks like this: 

01_flow_power.JPG

 

In powerapps, I run the following: UpdateContext({conPhoto: Camera1.Stream});
Collect(ColOCRText,(DEV_BUSCARD.Run(conPhoto)))

 

The output is flow is like this: 

02_flow_power.JPG

 

The collection is however empty. 

03_flow_power.JPG

 

Can anyone assist here please?

 

Thanks

6 REPLIES 6
KroonOfficeSol
Level 10

Re: Collection empty after response from

@Noel34343 
First, check if 'conPhoto' has a value in there by looking at the variables and try to place it under an Image control to see if you have the image you took.

If so then try to remove ( ) surrounding your flow call, like

Collect(ColOCRText, DEV_BUSCARD.Run(conPhoto))

Look in your Flow if it has run and if your collection has a record now.  Still no record, then:

  • try to rename your collection and run it again
  • go to view - datasource, remove the flow connection, add a button and on the button.onselect go to flows to re-connect your flow.
  • See if your flow has the right schema and all the columns have a type specified and are required. (But if not you already should have an error while connecting your flow, so basically the option before this would break)

Hope this helps you fix this.

 

Paul

 

Noel34343
Level: Powered On

Re: Collection empty after response from

Hi Paul,

 

conPhoto has no value within the variables. 06_flow_power.JPG

 

I do see a picture here though in the captured image: 

04_flow_power.JPG

I removed the () and all ran ok but still the collection remains empty. 

 

Thanks. 

KroonOfficeSol
Level 10

Re: Collection empty after response from

@Noel34343 

 

So the problem is at the start, so here UpdateContext({conPhoto: Camera1.Stream}); so lets try to fix this.

I think you need this on the Camera.OnSelect:

UpdateContext({conPhoto: Camera1.Photo});

.Stream sounds like a video stream instead of a Photo I would think.

Paul



Noel34343
Level: Powered On

Re: Collection empty after response from

Hi, 

 

You can use the stream option when using a button to take the photo. So just to simplify it, I just have this on select for the button: UpdateContext({conPhoto: Camera1.Stream})

07_flow_power.JPG

 

This is the result in the variable part: 08_flow_power.JPG

 

Noel34343
Level: Powered On

Re: Collection empty after response from

HI Paul,

 

Just an update here, it all runs fine on my laptop. Grabs the photo and the collection from the flow is also visable. 

So the issue is with my mobile phone? Any tips on that?

 

Thanks again

KroonOfficeSol
Level 10

Re: Collection empty after response from

@Noel34343 

 

I did some test on my side and it seems that it just not possible to do. I would think you should be able to do

Button.Onselect

Select(Camera)

With this you should tricker the onselect property of the Camera control. Then on the camera you should be able to crab your photo on the camera.onselect. like:

Collect(_Photos, Camera.Photo)

This should work like it does on other controls, but It doesn't. So basically this is a limitation or a bug in the camera control.

I would advise you to just add a label instead of the button and tell the user to click the camera control itself.

 

I took the liberty to post an Idea on the bugs, see https://powerusers.microsoft.com/t5/PowerApps-Ideas/Camera-Control-tricker-taking-photo-from-other-c...Maybe you could support this, so the PowerApps team can fix this.

 

Greating Paul

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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