Others

How to Disable a Power Apps Button After a User Submits Once

Khadija KhanKhadija Khan Oct 26, 2026 868 views

Question details

The user needs to prevent duplicate entries by disabling a Power Apps submit button after a user successfully submits their initial record.

How to Disable a Power Apps Button After a User Submits Once
Product
Power Apps
Device & OS
not provided
Scenario
Building a custom application or form where users are restricted to submitting information exactly once.
Observed behavior
The application needs to dynamically evaluate the connected data source to see if the user's email already exists, and grey out the button if a match is found.
Before you start

Ensure your Power Apps data source (such as SharePoint, Dataverse, or SQL Server) is correctly connected and includes a column that captures the user's email address upon submission.

Solution 1Recommended

Configure the Button's DisplayMode Property

Use a conditional logic formula in the DisplayMode property to check the data source for the current user's email.

Power Apps allows you to change a control's interactive state dynamically. By counting the rows in your data source that match the current user's email, you can easily toggle the submit button between Edit (clickable) and Disabled (unclickable) modes.

1
Select the Submit Button

Open your canvas app in Edit mode and click on the specific submit button that you want to restrict.

2
Access the DisplayMode Property

In the property dropdown menu located on the top-left side of the formula bar, search for and select 'DisplayMode'.

3
Enter the Validation Formula

In the formula bar, type the following expression: If(CountRows(Filter(datasource, useremailID = User().Email)) > 0, DisplayMode.Disabled, DisplayMode.Edit). Be sure to replace 'datasource' with the actual name of your data source, and 'useremailID' with the exact name of the column storing the email.

4
Test the Application

Save your progress and run the app in preview mode. Ensure that the record saves successfully upon the first submission and that the button correctly disables immediately afterward.

Configure the Button's DisplayMode Property
Performance Optimization: For large datasets, ensure that the column checking the user's email is indexed or delegable in your data source to prevent performance warnings or inaccurate row counts.
Free Microsoft Office alternative

Looking for a Lightweight Alternative for Your Office Tasks?

While Power Apps is an excellent tool for custom data entry applications, analyzing the exported data is often done in spreadsheets. WPS Office is a powerful, lightweight, and cost-effective alternative for handling everyday spreadsheet, document, and presentation tasks.

Fully compatible with Microsoft Excel (.xlsx), Word (.docx), and PowerPoint (.pptx) formats.Easily analyze data exported from custom apps using built-in spreadsheet pivot tables and charts.Free and lightweight, consuming minimal system resources on your device.Familiar user interface requires zero learning curve, ensuring a seamless migration.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use a local variable to disable the button instead of querying the data source?

Yes. You can use the UpdateContext or Set function to change a boolean variable to true upon successful submission, and set the button's DisplayMode to read that variable. However, checking the actual data source is more secure because local variables will reset if the user closes and reopens the app.

Why does my button remain active even after a record is submitted?

This usually happens if the data source name or the email column name in your Filter function is misspelled. It can also occur if the form submission (the Patch or SubmitForm function) fails or has a delay in synchronizing with the data source.

Is it possible to completely hide the button rather than just disabling it?

Absolutely. If you prefer the button to disappear entirely, select the button, choose the 'Visible' property, and enter a similar formula: If(CountRows(Filter(datasource, useremailID = User().Email)) > 0, false, true).