How to Make a Confirmation Dialog Box in Power Apps Canvas App

How to Make a Confirmation Dialog Box in Power Apps Canvas App

Confirmation dialog boxes are commonly used in applications to prevent accidental actions such as deleting records, submitting forms, or updating important data. In Power Apps Canvas Apps, you can create a custom confirmation popup that asks users to confirm their action before proceeding.

Using confirmation dialogs improves user experience, reduces mistakes, and provides better control over critical business processes.

Business Scenario

Suppose users can delete customer records from a Canvas App. Before deleting the record, a popup should ask:

Are you sure you want to delete this record?

Only after confirmation should the record be deleted.

Step 1: Create Variable

UpdateContext(
{
ShowPopup:true
}
)

Add this code to the Delete button OnSelect property.

Step 2: Create Popup Container

Insert:

Step 3: Control Visibility

ShowPopup

Set the Visible property of popup controls to ShowPopup.

Step 4: Configure No Button

UpdateContext(
{
ShowPopup:false
}
)

The popup closes without performing any action.

Step 5: Configure Yes Button

Remove(
Customers,
Gallery1.Selected
);

UpdateContext(
{
ShowPopup:false
}
)

The selected record is deleted after user confirmation.

Popup Layout Example

+----------------------+

Are you sure?

[ Yes ]   [ No ]

+----------------------+
Important: Always use confirmation dialogs for delete, submit, approve, and update operations to avoid accidental data loss.

Benefits

Common Use Cases

Key Takeaways