I am currently using a camera and pen input control inside my app. I have set it up so it takes the image from either control and saves it into a SharePoint list. Right now both controls work in terms of saving the image into a SharePoint list. However the problem I am facing is the data of the pen input image that is saved into the list is in the form of like a local blub uri (e.g. blob:https://create.powerapps.com/623fa25e-85a2-404a-949e-bcf6044362cf), as a result whatever pen input images I draw and save into SharePoint, as soon as I close the app the images no longer exist.
The camera control is saving the images as some base64 data (e.g. data:image/jpeg;base64,/9j/4AAQSkZJRgABA...) and works perfectly fine. Images still exist and can be viewed after I close the app.
Is there any way to get the base64 data of pen input images, or any potential solutions that work around this?
Thank you in advance.
Solved! Go to Solution.
I am trying to do the same thing but having an issue in flow execution with error message in dataUriToBinary() method as following
"InvalidTemplate. Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '1995': 'The template language function 'dataUriToBinary' expects its parameter to be formatted as a valid data URI. The provided value 'appres://blobmanager/7270bfce54874fcd830756ba77f58d59/5' was not formatted correctly."
I am following exact steps from the YouTube tutorial video but it seems for the PenInput.Image only returns the image's blob storage address instead of the URI stream. Could you please help me to identify what am I doing wrong there.
Check on these blog entries from John Liu that will give you the exact workaround you need:
I tried the second link as a solution changing the Picture Control to Pen Input Control, and worked just the same. In the solution he used Microsoft Flow, so when creating my own flow I used the actions "Create item" and "Add attachment" instead of creating a file in document library as he indicated in the steps and it worked awesomely 😄
Hope it helps!
I would like ti do the same ...
Do you have the solution to save pen input image (from a collection) to a sharepoint List ?
Thank you in advance 🙂
For the PenInput, on collect(), what is LocalImage?
On my code for the peninput image capture, I wrote
But it gives me an error saying I need a collection instead of the datacardvalue8 and peninput1.image says "expected a record or table value"
A new easy and multi-purpose solution to save pen-input to Sharepoint is found thanks to Shane Young, utilizing the addition of a PowerApps Json functionality added on 02/05/2019.
The Short description on how to make this work is to save the pen input image in a JSON format asking the JSON function to include Binary Data:
Set( PenVar, JSON( PenInput1.Image,JSONFormat.IncludeBinaryData ) );
Read full how-to and demo here: http://iiu.dk/2019/10/12/powerapps-pen-input/
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights