cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rockonron
Level: Powered On

PowerApps Signature to Sharepoint List - Solved

Hi Everyone,

 

I think I have come across a solution for the dreaded saving a signature to a SharePoint list.

 

Previously I had used two flows for this. the first one got the image data from PowerApps and sent an email to a shared mailbox, the second flow looked at that mailbox for new emails, sucked out the attachment and added it to SharePoint.

 

I always found this solution cumbersome and you had to mess around with mailbox permission etc.

 

However, this morning i decided to give this another go, and the solution I have now is 1 flow with only 2 steps to save a signature to a SharePoint list.

 

Ok here goes.

 

1. Add a button to your PowerApp and create a flow that is triggered by this.

 

2. In the flow Add an action to send an email and fill in the details as you normally Capture1.JPG

The important part here is that you click on the attachment content field and select Ask from PowerApps.

 

3. Add another action to your flow underneath this one, this is the Add an attachment action for Sharepoint.

Capture2.JPG

In this action select the necessary Sharepoint list and click on the ID field, again select "Ask in PowerApps"

In the File Content Field Select the "Sendanemail(V2)_AttachmentsContent" option from your dynamic content.

The To address can be to any real address you like.

 

4. Go back to PowerApps and complete your Flow parameters.

In this case, we want to pass the ID of the SharePoint item we are working with and the peninput1.image.

I use Text(Last('PPE Log').ID) after a submit form for the ID, this will get the last item added to my Sharepoint List, this is the item I want the signature to be attached to.

 

So my Button should now read something like this

 

Set(varsig,PenInput1.Image);

'PowerAppsH&S-SaveSignature'.Run(Text(Last('PPE Log').ID) ,varsig)

setting the variable varsig may not be necessary, just a habit of mine.

 

This is passing the ID of the Sharepoint item I want to attach my signature to and the image content of that signature.

 

Run through your app once and press the button, this will attach the signature correctly to the sharepoint list, but you will however receive an email, now here comes the clever bit 🙂 

 

Go back to your flow and delete the email step, this will leave you with two steps as below

 

Capture.JPG

Do not change anything else.

 

Test your app again and you will see that the signature attachment gets attached to the SharePoint item straight away, without any need for emails or permission on mailboxes or multiple flows etc.

 

I was so excited about this i wrote this post as soon as i came across the solution however it should be noted I have not stress tested this in any way, my concern is that some sort of permissions issue will come active when another user tries to use it. But so far for me it is working perfectly.

 

Hope this helps, i may try expanding this to camera control images as well.

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
rockonron
Level: Powered On

Re: PowerApps Signature to Sharepoint List - Solved

Hi,

 

I had this issue before. Can you try requesting the filename in flow from powerapps.

 

Then in powerapps send the filename incluiding the extension i.e. .jpg

 

Ronan

 

 

View solution in original post

7 REPLIES 7
v-siky-msft
Level 10

Re: PowerApps Signature to Sharepoint List - Solved

Hi @rockonron ,

 

Thanks for your sharing.

 

Best regrads,

Sik

Daveed73
Level: Powered On

Re: PowerApps Signature to Sharepoint List - Solved

Hi, thanks for this, sounds great!

 

I'm having a slight issue though, when the attachements come through on email it says it is an unsupported file when trying to open it. Changing the fine name extension to a text file reveals a load of text and numbers. So I'm guessing it is saving the pen input as text file rather than an image. Is there a way of changing this?

 

I have done something similar when using the Office365 Email connector which uses this format...

{Attachments:Table({Name:"image.jpg"; ContentBytes: peninput.Image ; '@odata.type':""})}

But this format doesn't work using the example above.

 

Any help would be appreciated. Thanks in adavnce.

 

rockonron
Level: Powered On

Re: PowerApps Signature to Sharepoint List - Solved

Hi,

 

I had this issue before. Can you try requesting the filename in flow from powerapps.

 

Then in powerapps send the filename incluiding the extension i.e. .jpg

 

Ronan

 

 

View solution in original post

Daveed73
Level: Powered On

Re: PowerApps Signature to Sharepoint List - Solved

Not sure what the issue was but it started working by itself. Odd!

codecheck
Level: Powered On

Re: PowerApps Signature to Sharepoint List - Solved

this looks really simple but I've been trying to get this working and seem to have hit a brick wall, if i use varsig the formula shows errors regarding Invalid argumet type (expecting number value) , but if i use any other value the flow triggers but fails to get past the email step due to "Parameter 'Attachment Content' cannot be null or empty." 

 

this is the Button onselect formula that fails

 

Set(varsig,PenInput1.Image);

Nearmisssigtolist.Run(Text(Last('Waste Near Misses').ID),varsig) 

 

any ideas why it wont work? 

JensKofod
Level: Powered On

Re: PowerApps Signature to Sharepoint List - Solved

An easy and multi-purpose solution is found to add pen-input to Sharepoint 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 ) );

See here for details: https://iiu.dk/2019/10/12/powerapps-pen-input/

codecheck
Level: Powered On

Re: PowerApps Signature to Sharepoint List - Solved

i managed to fix this in the end by sending the peninput to variable, then the rest of the flow functioned fine and it also works in the same manner for images from a camera control. 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 153 members 5,344 guests
Recent signins:
Please welcome our newest community members: