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:
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?
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.
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?
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.
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.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
200 | |
71 | |
50 | |
46 | |
20 |
User | Count |
---|---|
256 | |
120 | |
84 | |
79 | |
69 |