A Tricky Way to Trigger an Action When the Enter Key is Pressed in Power Apps

A few weeks before, I developed a Power Apps application. After using that, many users expected to submit the data by pressing the Enter key on the keyboard. Although this feature isn’t available by default in Power Apps but it can be set up with simple steps.

In this article, I will explain how to trigger an action when the Enter key is pressed in Power Apps with a simple example.

Submit Form in Power Apps Using the Enter Key

Look at the leave request form below; after filling in all the details in the Power Apps form, I press the Enter key on the keyboard, and it automatically submits the form details.

powerapps submit data by clicking enter key

The SharePoint list [Employee Leave Requests] stores details entered in the Power Apps form.

power apps submit form with enter key pressed

Follow the steps below to achieve this!

1. Connect the SharePoint list with the Power Apps application by clicking the +Add datasource under the Data section.

powerapps press enter to submit

2. Add an Edit form control from the + Insert tab and provide the connected SharePoint list name on its DataSource property.

'Employee Leave Requests'
powerapps press enter key to submit form

3. Add a button control to submit the form details and provide the below formula on its OnSelect property.

SubmitForm(frm_EmpLeave);
NewForm(frm_EmpLeave);

The SubmitForm() function will submit the Power Apps form data to the SharePoint list. After submitting the form to make it a new form again, I used the NewForm() function.

press enter key to submit powerapps form

4. To achieve the enter key functionality for submitting the Power Apps form, add the below code in the OnChange property of the last field present in the Power Apps form control.

Note: Power Apps has no direct functionality that identifies the Enter key press on the keyboard, so the formula below will implicitly call the button control’s Select property after entering the data and pressing the Enter Key.

Select(btn_Submit)

btn_Submit is the button control name.

press enter key to submit  powerapps form  data

5. Save the changes and publish the application. While previewing, fill in the Power Apps form details, make sure your cursor is on the last field in the form, and click on the Enter key. It calls the formula on the button control OnSelect property and submits the form data to the SharePoint list, as shown in the image below.

powerapps press enter key to submit form details

This is one approach to achieve the submit form data by clicking the Enter key in Power Apps.

I hope you understand how to submit Power Apps form data by clicking the Enter key on the keyboard. I have explained how to achieve this with simple steps! Follow this article if you’re also trying to fulfill this requirement.

Also, you may like:

>
Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial

FREE Power Platform Tutorial PDF

Download 120 Page FREE PDF on Microsoft Power Platform Tutorial. Learn Now…