cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted

Can you tell me how you created your summary page and is the information (Preventative action) also stored in the same collection or in a data source?

Highlighted
Anonymous
Not applicable

Hi, the summary page came when I used the "Create an APP" function from SharePoint. 

 

Yes, the preventive action is stored in the same SharePoint list but not in the collection.

 

Currently, only the images taken by the camera function will be stored in my collection called "MyPicture". 

 

Thank you!

Highlighted

Interesting, Is there a reason why you don't store the image to your SharePoint source with the rest of the information? If you leave everything as it is you will need some way to link the data with that specific image for that entry.
Highlighted
Anonymous
Not applicable

I have tried to save the photo taken by the camera to my data source using the Patch function but it doesn't seem to work.

 

I tried creating columns to show pictures but nothing gets saved in that column. 

Highlighted

Can you share how you tried to use the patch function? does your sharepoint list have a column for the image (pictures/links)? The other issue with using a collection is that it is only available in the currect session unless you store them somehow so it might make sense for you to store the image directly to your sharepoint list.

Highlighted
Anonymous
Not applicable

Hi, here is my code for the Patch function:

Patch('Defect Handling', Defaults('Defect Handling'), {'Defects/Abnormalities 缺陷描述:': DataCardValue9.Text, 'Date Found 发现日期:': DataCardValue10.SelectedDate, 'Observed By 由谁发现:': DataCardValue11.Selected, 'Department:': DataCardValue12.Selected, 'Cell & Line Structure (PMD):': DataCardValue13.Selected, 'Cell & Line Structure (SMD):': DataCardValue14.Selected, 'Cell & Line Structure (FMD):': DataCardValue15.Selected, 'Cell & Line Structure (Utility):': DataCardValue1.Selected, 'Module (PMD):': DataCardValue16.Selected, 'Module (SMD Cell 1 Line A):': DataCardValue32.Selected, 'Module (SMD Cell 1 Line B):': DataCardValue33.Selected, 'Module (SMD Cell 2 Line A):': DataCardValue34.Selected, 'Module (SMD Cell 2 Line B):': DataCardValue35.Selected, 'Module (FMD):': DataCardValue36.Selected, 'Module (Utility):': DataCardValue44.Selected, 'Equipment Part (FMD):': DataCardValue45.Selected, 'Type of Defect 缺陷种类:': DataCardValue37.Selected, 'Defect Priority 缺陷等级:': DataCardValue38.Selected, 'Root Cause 发生原因:': DataCardValue39.Text, 'Status of Defect 缺陷状态:': DataCardValue40.Selected, 'Images:': First(MyPicture).Url}); Navigate('Home Page', ScreenTransition.None); Reset(DataCardValue1); Reset(DataCardValue9); Reset(DataCardValue10); Reset(DataCardValue11); Reset(DataCardValue12); Reset(DataCardValue13); Reset(DataCardValue14); Reset(DataCardValue15); Reset(DataCardValue16); Reset(DataCardValue32); Reset(DataCardValue33); Reset(DataCardValue34); Reset(DataCardValue35); Reset(DataCardValue36); Reset(DataCardValue37); Reset(DataCardValue38); Reset(DataCardValue39); Reset(DataCardValue40); Reset(DataCardValue44); Reset(DataCardValue45); Clear(MyPicture)

I have to clear the collection of "MyPicture" because if I don't do so, when the next user submits the form, the previous user's image will be submitted as well. 

 

So I tried to create a Picture column in my SharePoint list and tried to patch the image taken to that column but nothing happens in that column whenever I click on the "Submit" button. After watching a guy on YouTube, I created a "Multiple Lines of Text" column in my SharePoint list instead to store the images taken.

Highlighted

Hey @Anonymous ,

 

Have you tried testing your patch function in Studio? Usually it would give you an error that would tell you why it is not able to add the entry. I could be wrong but this might be related to how you are patching the image, I would try changing the images column to be of type "multiple lines of text" and see if that works for you.

 

If that doesn't work then you might to do something similar to this tutorial:  https://explore.emtecinc.com/blog/how-to-upload-camera-pictures-directly-to-microsoft-sharepoint-with-powerapps-and-microsoft-flow 

 

Hope this helps!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,681)