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

Take 2 consecutive photos in powerapps

Hello,

 

I need to use the camera function within PowerApps in order for employees to take pictures of their employee card (front picture and back).

 I'm using two variables (FrontPic & Backpic) in order to save the pictures, my only problem is that I need to use one button that firstly takes the first picture -> which saves itself in the  FrontPic variable, and after that, I want to store the second picture - in the Backpic variable.

 

I've tried using this formula, but it only saves the Frontpic variable.

 

If(IsBlank(FrontPic),UpdateContext({FrontPic:Camera1.Stream}),UpdateContext({BackPic:Camera1.Stream}));

 

Please, could somebody advise?

4 REPLIES 4
lucia
Level 8

Re: Take 2 consecutive photos in powerapps

Hey,

 

do you clear this variables after you save the photos somewhere?

DavidGorgan
Level: Powered On

Re: Take 2 consecutive photos in powerapps

Hello,

Yes, I need these two variables for a Microsoft Flow, after the pictures will be submitted, I will reset both variables so the next employee can use it.

lucia
Level 8

Re: Take 2 consecutive photos in powerapps

Hey,

 

maybe the problem is that in cannot be saved in a variable. When I am saving photos from camera I am saving it to a collection and then using Firct(collection).url to save it to the flow. I would suggest this and maybe have an extra variable which will change depending if on which picture to take. For example it can be set to true when you first enter to the camera screen and then on click it can change to false and it can reset after all.

 

Hope this helps.

PavanKumar
Level 8

Re: Take 2 consecutive photos in powerapps

Hi,

 

Can you try this?

 

If(IsBlank(First(FrontPic).Url),ClearCollect(FrontPic,Camera1.Photo),ClearCollect(BackPic,Camera1.Photo));

Then use

First(FrontPic).Url;
First(BackPic).Url);

To send to the flow.

 

If this answers your question do mark it as verified.

Regards,

Pavan Kumar Garlapati

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 381 members 4,811 guests
Please welcome our newest community members: