cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ajilakes
Advocate II
Advocate II

Capture Image and Save as Attachment

Good afternoon Everyone,

 

Today I've been having an issue with my SharePoint list and Powerapps. I am trying to figure out if it's possible to capture an image on a screen an attach the image to the attachments data card on the same screen? 

 

Look forward to hearing from yall,

 

Best,

AL

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Ajilakes 

 

camera control onselect property

ClearCollect(colImages,{Name:"1.png",Value:CameraControlName.Photo})   (this will work for 1 image only)

 

If you need multiple then

Collect(colImages,{Name:Now()&".png",Value:CameraControlName.Photo}) 

 

then for the attachments control Items property use

colImages

 

 

View solution in original post

11 REPLIES 11
RezaDorrani
Dual Super User II
Dual Super User II

Hi @Ajilakes 

 

Assuming you are using add picture control to add image which needs to go to gallery

 

on button click - 

ClearCollect(colImage,{Name:AddMediaButton.FileName,Value:AddMediaButton.Media})

 

Then for the attachments control set items property to colImage

This will show the uploaded image in the attachments control

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

@RezaDorrani I am actually using a Camera Control and a Image Control. I have a form with the data card attachments. 

In my Camera Control (Onselect): ClearCollect(colPhoto, Camera1_1.Photo)

For my Image Control (Image): First(colPhoto).Url

 

Whenever I capture an image is it possible to have it automatically inputted as an attachment in the data card to appear on the screen. 

I will post pictures of my screen.

 

 

 

Hi @Ajilakes 

 

then use 

ClearCollect(colImages,{Name:"1.png",Value:Camera.Photo})

Hi @RezaDorrani 

 

I am still a bit confused about what controls I would have to input that information. Could you help me out with this?

 

Look forward to hearing from you

Hi @Ajilakes 

 

camera control onselect property

ClearCollect(colImages,{Name:"1.png",Value:CameraControlName.Photo})   (this will work for 1 image only)

 

If you need multiple then

Collect(colImages,{Name:Now()&".png",Value:CameraControlName.Photo}) 

 

then for the attachments control Items property use

colImages

 

 

View solution in original post

@RezaDorrani 

Thank you, Reza,

 

Really appreciate the time and effort you took to help me with this issue. The attachments are now being filled in every time I click the picture, thanks again. This is exactly what I needed and hope you have an amazing day. 

 

Best,

Alexander Lagos

@Ajilakes 

Hi @RezaDorrani ,

 

I am having an issue trying to send that attachment once it gets created into the Datacard.

 

When I click on the image it creates a link for the image in the attachments data card. The only issue with this is when I try to submit, it gives me an error saying, "entry is required or has an invalid value. please correct and try again." 

 

It won't submit the attachment of the camera control image, but if I click on attach a file, it goes straight to a folder to select a file and that file will allow me to submit. The issue seems like it has to do with the collection.

 

Would you be able to help me with this one more thing? 

(Attachment shows the error)

Hi this looks to work, but then only one file is being added and each subsequent photo is replacing the previous on1.  Therefore no matter what I do I only get one photo, and when I then try and open that photo from the attachments field I get a message saying no file.

 

In addition I also get an error when I try and submit the form, and when I remove the picture, the form submits without any issues, so while the picture capture is good, attaching works, but you cannot then submit the form with the attachment!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,330)