CRM Beans

How to use PowerApps pen input control?

pen input control
Share this knowledge

In this post we will see the use case of the PowerApps Pen input control.

Power Apps example

These are the activities we will perform for this power apps example.

  1. Create a consent form with basic details where the user will fill in the information.
  2. Adding a pen input control on the form for the signature.
  3. Send mail to the user after form submission and attach the signature in the file attachment.

This is how the final form will look like:

Consent form

After the submission this is the mail with details.

Consent Email

Steps for UI changes:

  1. Add a label control and place it on the top. Name it as consent form. Change the background color whatever you like.
Power Apps consent form

  • Add labels with name and email ID and add text boxes. Rename the text boxes to name and email.
power apps labels

  • Add age slider and name it as age.
  • Add PowerApps Pen Input control for signature. Rename it to sign.
  • Add submit button and reset button.

After adding all these items your form will look like this. Change the background color as per your requirement.

Pen input control

Step 2

Connect your app to office 365 outlook.

  1. In the data section click add data.
Add data

  • Search for office 365 outlook
Add data source

  • It will search for the outlook account and create the connection.
Chose office365 outlook

Step 3

After establishing the connection you are ready to write the logic to send email.

  1. On the submit button onSelect property, write below code.
Office365Outlook.SendEmail("ashutoshm@crmtrial.onmicrosoft.com", "Test Consent mail from PA",

"Name : " & name& Char(10)&

"Email : "& email & Char(10)&

"Age : "&age & Char(10)&

"Signature : " & sign.Image,

{Attachments:Table({Name:"Peninput.jpg", ContentBytes:sign.Image,'@odata.type':""})});

Reset(name);

Reset(age);

Reset(email);

Reset(sign)

Office365outlook.sendemail takes multiple parameters.

To – Enter the email ID to whom you want to send the mail.

Subject – Enter the subject.

Body – Enter the text that you wanted to display in the body.

We have used Char(10) in our code. Char(10) is used for line breaks. It is same as <BR> in HTML.

For attachment, use the Attachments:Table function and it take 3 parameters, where you have to define the name of the attachment. Contentbytes will take the input as <filename>.Image and ‘@odata.type’

Reset all the fields.

Test your app. Great, You made a consent form. Now make the changes in the for as per your requirements.

There are many use case of this. You can create it for House Inspection. Field visit completion, Delivery acknowledgement and many more.

Read : How to close any CRM activity automatically by using power automate flow?


Share this knowledge

Leave a Comment

Your email address will not be published. Required fields are marked *