cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Elitezone
Post Prodigy
Post Prodigy

Save camera image to Sharepoint list.

Hello I am trying to create a function that will allow users of my app to make a photo, preview it and save.

I used a tutorial and made it like that:

 

I inserted camera control with function:

 

If(varZrobione=false,ClearCollect(CameraImage,Camera1.Photo); UpdateContext({PhotoDateTime: Now()});Patch(Obrazy_obecnosc, Defaults(Obrazy_obecnosc), {Title: TextInput2.Text, 'Informacje o obrazie': First(CameraImage).Url});Set(varZrobione,true))

 

I also use input text control (default parameter):

 

"Zdjecie wykonano prawidlowo " & PhotoDateTime

 

and image control that shows photo that was made:

 

LookUp(Obrazy_obecnosc,Title= TextInput2.Text, 'Informacje o obrazie')

 

 

This seems to be working. It is saving data to Sharepoint list, but how can I retrieve this on a different screen in a different scenario. This tutorial is using input text to preview the image, but this input text is dynamic (every user has it individually).

 

My sharepoint list got only one field - Informacja o obrazie multiline text field.

It looks like this:

Elitezone_0-1603785069455.png

 

Should I maybe create ID field or use default field?

 

How would you guys recover this item in gallery. 

I want to mix this photo with different sharepoint list data showing fields: Name, Date of submission, Details, GPS Data.

Or maybe I should include all data in one sharepoint list and patch it after everything is filled?

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @Elitezone ,'

You have saved the Base64 Text successfully - now you just want to view it? I have done a blog on SharePoint images and you might check that you are following this process.

If for instance you are wanting to view it on a form or gallery containing the relevant record, the image control image is simply

ThisItem.YourImageFieldName

If outside this and the record was selected from a gallery it would be

YourGalleryName.Selected.ImageFieldName

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

@WarrenBelz 

Warren - I believe that my function to review image is bad cause it needs to save image to Sharepoint list first.

Your function:

First(CameraImage).Url

on the other hand is allowing a preview from collection without saving.

 

With this I can move patch function much further. So users make photo, review it , add all data and patch is at the end.

And I do not need this invisible input text...

 

I am just testing whether this won't bug if more users use it.

I want to be sure that everyone will see theirs face... 

 

Also shouldn't I clear collection or something after I save all data to sharepoint?

@Elitezone ,

Yes that will view the photo from the collection, but I thought you wanted to view it from the Base64 Text in SharePoint.

Please let me know.

@WarrenBelz 

Warren tbh I do not know how I want to view it.

I need to see it in two places.

 

1. When user make this photo and fill data (he then saves data to sharepoint list).

2. In admin gallery on totally different screen - where admin can see all photos, sort them etecera.

 

If I understand correctly.

Seeing it from collection will work for a preview for user, but if I want to make this user accessible to others in galleries, tables, labels then I should view it from Base64 Text?

Hi @Elitezone ,

Please read my first post - it is no different from displaying a field except you do it in an image control. Please ensure you have saved it as per the notes in my blog.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,028)