<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=612681139262614&amp;ev=PageView&amp;noscript=1">
Skip to content

Need help? Talk to an expert: phone(904) 638-5743

Confirmation Pop Up Screens For Deleting [Building Power Apps In Microsoft Teams – Ep. 8]

Confirmation Pop Up Screens For Deleting [Building Power Apps In Microsoft Teams – Ep. 8]

Matt Peterson, a trainer at Pragmatic Works, continues his series on building apps in Microsoft Teams in Episode 8, focusing on creating confirmation pop-up screens for record deletion. This feature ensures that users do not accidentally delete important data and adds an extra layer of control within the app.

 

Introduction to Pop-Up Screens

Matt begins by emphasizing the importance of confirmation screens in apps. He explains that these pop-ups prompt users to confirm their actions before permanent changes occur, such as deleting a check-in record in a Microsoft Teams application. This reduces errors and enhances the user experience.

Setting Up the Delete Function

He demonstrates the basic deletion process first. By adding a trash can icon to each record in the gallery, users can delete entries with a simple click. The deletion action is configured using the OnSelect property of the icon, which removes the selected record from the database.

  • Insert a trash can icon into the gallery template cell.
  • Set the OnSelect property to remove the selected record from the table.
  • Preview the deletion to ensure it works correctly.

While the basic deletion works, it can be risky. Accidentally clicking the delete button immediately removes the record, which is why confirmation pop-ups are crucial.

Creating the Pop-Up Screen

Matt explains how to design a pop-up using a container component. Containers are preferred over grouped controls because they provide better organization and flexibility.

  • Insert a container that covers most of the screen to serve as the pop-up.
  • Set the container's fill color with slight transparency so users can still see the underlying screen.
  • Add a label that dynamically displays the name of the record selected for deletion.
  • Add two buttons: one to confirm deletion ("Yes, Delete") and one to cancel ("Keep Record").

Using Contextual Variables for Visibility

To control when the pop-up appears, Matt uses contextual variables. These variables are limited to the screen and can be updated based on user actions.

  • Declare a contextual variable VAR_show_confirmation on the screen's OnVisible property, initially set to false.
  • Set the container's Visible property to reference this variable.
  • When a user clicks the trash can icon, update the variable to true to show the pop-up.
  • Clicking "Keep Record" sets the variable back to false, hiding the pop-up.
  • Clicking "Yes, Delete" removes the record and then hides the pop-up by resetting the variable to false.

Dynamic Labels for Context

Matt ensures that the pop-up label dynamically references the selected record. By using the gallery's selected item properties, the pop-up shows the first and last name of the student record being considered for deletion. This provides clarity for users and prevents mistakes.

Enhancing Gallery Design with Containers

Beyond the pop-up functionality, Matt shares design tips for improving the gallery layout. He suggests embedding galleries inside containers for better responsiveness and visual enhancements.

  • Set the gallery's height and width relative to the parent container to ensure responsiveness.
  • Add drop shadows to containers for a polished look.
  • Customize borders and border radius to create softer, visually appealing elements.
  • Use containers to make design adjustments easier, ensuring that galleries move and resize dynamically.

Final Thoughts

Matt concludes by emphasizing the simplicity and usefulness of pop-up confirmation screens in Power Apps. This technique ensures that users have a chance to review their actions before making permanent changes. Additionally, the design tips for galleries enhance app usability and aesthetic appeal. He encourages viewers to continue following the series to build more robust and user-friendly Microsoft Teams applications.

Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Apps and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks. 

Sign-up now and get instant access

Leave a comment

Free Community Plan

On-demand learning

Most Recent

private training

Hackathons, enterprise training, virtual monitoring