cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Assign Images from Camera

Hi, I am creating an APP where the employees in my company have to key in the defects of the machine that they are operating and take photos of the defects in the form that I have created. After submitting the form, the screen will navigate to the summary page which will show details of the defects that they keyed in and the photos they have taken. However, it seems like I am unable to keep the images they took because every time a new photo is taken using the camera function, all the images in summary page will change to be the latest image taken. I have attached pictures of my APP in this post.

 

First Attachment: This is the form that I have created where the employees can click on "Take Photo" and they will navigate to the "Camera" screen

 

Second Attachment: This is the "Camera" screen with the capture button that has the formula Collect(MyPicture, MyCamera.Photo); Navigate(Image, ScreenTransition.None). After they capture an image, they will navigate to the "Image" screen to have a preview

 

Third Attachment: This is the summary page where the photos of defects are supposed to be. I have changed the "Image" property of the image to be "MyCamera.Photo"

 

Can someone tell me where I am doing wrong? Thank you!

16 REPLIES 16
PowerApps Staff Mr-Dang-MSFT
PowerApps Staff

Re: Assign Images from Camera

Ah, I know what the issue is here. Only the OnSelect property of the camera control is capable of getting a new photo.

 

If you use the icon's OnSelect property, it will only get the most recent image taken by the camera.

 

You will need to move your logic to the Camera control's OnSelect property.

Anonymous
Not applicable

Re: Assign Images from Camera

Hi, I have tried to move the formula Collect(MyPicture, MyCamera.Photo) to the camera's OnSelect property but this problem still persists. I tried to submit 2 forms and took 2 different photos but the photo in the first form will update to be the photo taken using the second form. Can you please help me with this? Thank you!

Anonymous
Not applicable

Re: Assign Images from Camera

Can anyone help me please? Thank you!

PowerApps Staff Mr-Dang-MSFT
PowerApps Staff

Re: Assign Images from Camera

 

@Anonymous, it sounds like you moved this formula to the Camera.OnSelect

 Collect(MyPicture, MyCamera.Photo)

You need to take pictures by clicking the camera now.

 

Then on the next screen, you'll want to point the Image control to

Last(MyPicture).Value so it shows the last image in the collection.

 

Anonymous
Not applicable

Re: Assign Images from Camera

Hi, I think you misunderstood what I meant.

 

I would like to have a camera function in my APP which the employees can use to take photos of the defects that they encounter, and submit the photo together with the form. 

 

New Defect.JPG

 

And in the summary page after submitting the form, they should be able to see the photos of the defects that they took. However, whenever a new photo is taken by the camera, all the images in the summary page will be changed to be the latest image captured by the camera.  

 

PowerApps.JPG

 

Here are the properties:

 

Camera's OnSelect Property:

Collect(MyPicture, MyCamera.Photo); Navigate(Image, ScreenTransition.None)

Image Property:

MyCamera.Photo

Thank you!

Highlighted
PowerApps Staff mobaky
PowerApps Staff

Re: Assign Images from Camera

Hello @Anonymous ,

 

There seems to be a couple of things going on here. In your initial setup you were using a button/icon to add the Mycamera.Photo to the collection and navigate, this will not work because the photo only gets taken once the user presses on the Camera control.

 

Now what @Mr-Dang-MSFT was suggesting is that you remove the Button Icon and use the camera control to Collect and navigate to the new screen. There is however another solution that will allow you to use the Icon to take the picture using MyCamera.Stream and you can find more details here (Link).

 

If I understand correctly it seems that when you connect the image control in your photo defect summary you use the MyCamera.Photo instead of using the photo from the collection. I would suggest that you try to create a gallery that uses the photo collection and display the images from each Item to see if these images are preserved after you take your new photo.

 

Hope this helps 🙂

 

Anonymous
Not applicable

Re: Assign Images from Camera

Hi, thank you for your reply.

 

I don't really understand what you mean and how to go about doing it.

PowerApps Staff mobaky
PowerApps Staff

Re: Assign Images from Camera

Alright let's look at each issue seperately. So in your summary page, you mention that your Image property is set to MyCamera.Photo which is the last photo taken by your Camera control  ... Instead you need to set it to the image property to show the image for the entry in your collection.

Anonymous
Not applicable

Re: Assign Images from Camera

Thank you for your reply.

 

What should I change the image property to? Is it "MyPicture"?

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 (5,642)