In this article, I will demonstrate how we can use the Pen Input Control to capture user signatures and store them in a Dataverse table within a Canvas App.
In Dataverse, we will utilize the Image column to store the captured signature from the Canvas app using the Patch function.
Let’s get started with the steps to create a Dataverse table and a Canvas app.
Create a Dataverse table:
- Connect to the Power Apps maker portal.
- Create a new table ‘Employee Signatures‘ as shown below.

- Add a new column of Image Data type as shown below.

Now that we have the Dataverse table set up to store the signatures, let’s proceed with creating the Canvas app.
Create a Canvas App:
- From the Power Apps maker portal, create a new Canvas App.
- Add the ‘Employee Signatures‘ table to the data sources.

- Add a Pen Input Control.

- Also add a Gallery control to display the captured signatures and set the ‘Data source’ as ‘Employee Signatures‘ table.

- Add a button control. In the OnSelect property, write the following formula using the Patch function to create a new record in the ‘Employee Signatures’ table.
Notify("Saving the signature...");
Patch(
'Employee Signatures',
Defaults('Employee Signatures'),
{
Name: "Signature : " & Now(),
Signature: penCaptureSignature.Image
}
);
Refresh('Employee Signatures');

- That’s it! Play the app, and you are ready to capture and save signatures in the ‘Employee Signatures’ table.

🙂

![[Step by Step] Beginner : Create a PCF control and add it to a custom page](https://rajeevpentyala.com/wp-content/uploads/2024/12/image-49.png)

Leave a comment