LowCodeGo logo

Power Apps – How to Create a Confirmation Dialog

Overview

In this tutorial, you will learn how to create a confirmation dialog/popup when the user presses a specific icon. This is an ideal solution to give the user a second chance to back out of the change if the button or icon was pressed by accident

YouTube

Add Components

There are 5 main components to show a confirmation dialog:

  1. Semi-transparent screen overlay that restricts users from navigating off the dialog
  2. Confirmation dialog backdrop
  3. Label that will contain the confirmation message
  4. Button to proceed with action
  5. Button to back out of action

Screen Overlay

Add a rectangle to the screen and make sure it’s the same width and height of the screen. Update the Fill, HoverFill and PressedFill properties to a semi-transparent color. In this example RGBA(128, 128, 128, .2) is used. It will let the user know visually that the components behind the confirmation dialog are inactive and will not be able to select and buttons or icons.

add screen overlay

Confirmation Dialog Backdrop

Add a rectangle that’s centered on the screen. Height and width is up to your discretion. It’s recommended that you use a White fill for the Properties Fill, HoverFill and PressedFill. Border Color should be adjusted to a darker color with a width of 2.

add backdrop

Confirmation Text

Add confirmation text on the dialog. If you’re referencing data in a gallery, you can include it with the text property by using the Concatenate function.

add confirmation label

Proceed Button

Add a button to the screen that will be used to proceed with the action performed. It’s recommended that you use colors that draw the users attention to this button since it’s considered the primary action.

add proceed button

Cancel Button

Add a button to the screen that will be used to back out of the dialog and not proceed with the action. It’s recommended that you use lighter colors since it’s considered a secondary action.

add cancel button

Group Components

Group all of the components together, so it will be easy to hide/display the popup.

group controls

Visibility Properties

Go to the button or icon where you want to pop out the confirmation dialog. Go to the OnSelect property and set a new variable called displayConfirmation to true.

UpdateContext({displayConfirmation: true});

If you already have logic in this property that should not be triggered, cut it out and it will be inserted into the proceed button in the section below.

update icon/button

Go to the Visible property of the confirmation dialog group and input the displayConfirmation variable

update group visibility property

Confirmation Dialog Buttons

Go to the Proceed button of the confirmation dialog and input your logic to perform the intended action. After the action is performed, update the displayConfirmation variable to false.

update proceed button

Go to the Cancel button of the confirmation dialog and update the displayConfirmation variable to false. It will hide the dialog and perform no other action.

update cancel button

Test it out!

At this point your dialog should be operational.

working example

Leave a Reply

Categories

Follow us

Copyright ©LowCodeGo 2025

Discover more from LowCodeGo

Subscribe now to keep reading and get access to the full archive.

Continue reading