This article demonstrates the process of implementing a popup message box for deleting items from a gallery in Power Apps. We'll employ a standard gallery containing a delete button. When the delete button is clicked, a confirmation alert will prompt the user. Choosing 'Delete' will remove the item, while selecting 'Cancel' will dismiss the popup. Below is a vertical gallery showcasing the delete button for removing individual records.
![Employee details]()
To create the popup, we will utilize elements like rectangles, labels, and buttons, grouping them together. We'll leverage the visibility property to toggle the display of the popup.
![Create popup]()
Establish a variable upon clicking the delete button, as illustrated in the screen below.
![Establish variable]()
Adjust the visible property of the 'delete popup' group as demonstrated in the screen below.
![Delete popup]()
Assign the variable a value of false, ensuring that the popup is hidden when the cancel button is clicked.
![Assign the variable]()
Ultimately, we must formulate the delete button's function. Here, we're crafting a remove function to eliminate the selected record from the gallery.
![Delete button's function]()
On the final screen, clicking the delete button will prompt a popup for confirmation before deleting the item.
![Confirmation]()