---
title: "Enhance Model-Driven Apps with PowerFX: Creating Pop-Up Confirmations"
description: Learn how to create a modal pop-up in a model-driven app using the 'Confirm' PowerFX function with this step-by-step guide.
---

[Pragmatic Works Nerd News ](https://pragmaticworks.com/blog)

# [Enhance Model-Driven Apps with PowerFX: Creating Pop-Up Confirmations](https://pragmaticworks.com/blog/enhance-model-driven-apps-with-powerfx-creating-pop-up-confirmations)

 Written by [Nate Halliwell](https://pragmaticworks.com/blog/author/nate-halliwell) | Jan 02, 2024

Creating a modal pop-up in a model-driven app without using JavaScript has become simpler thanks to PowerFX. [Nate Halliwell's](https://pragmaticworks.com/instructors/nate-halliwell) latest YouTube video guides viewers through this process. This post summarizes their tutorial, focusing on enhancing a model-driven app's functionality with the 'Confirm' PowerFX function.

### Simplifying Asset Management in Model-Driven Apps

The video starts with a familiar scenario in asset management, showcasing a model-driven app. The app lists assets and asset items, leveraging the new Power Apps grid control. Although functional, the app lacks user notifications when decommissioning child items from assets.

### The Challenge: Adding Confirmation Without JavaScript

The key challenge addressed is adding a confirmation pop-up when decommissioning items. Traditionally, this required custom JavaScript, but PowerFX offers a streamlined solution.

### Step-by-Step Guide to Implementing the Confirm Function

1. **Accessing the Command Bar**: The first step involves navigating to the command bar in the model-driven app's designer interface.
2. **Editing the Main Grid Command Bar**: Focus on the main grid's command bar, where the custom 'Decommission Items' button is located.
3. **Utilizing the Component Library**: For a more familiar design experience, especially for those with a canvas app background, the tutorial suggests using the component library.
4. **Incorporating Alternate Data Sources**: The necessity of bringing in alternate data sources like asset items is highlighted.
5. **Writing the PowerFX Formula**: The crux of the solution is writing a PowerFX formula that utilizes the 'Confirm' function within an 'if' statement.
   
     - **Creating the Confirm Function**: The 'Confirm' function requires parameters like the text for the pop-up, title, subtitle, and labels for the confirm and cancel buttons.
     - **Result Handling**: The function outputs a boolean value, triggering different actions based on user selection (confirm or cancel).
6. **Testing and Deploying**: After saving and publishing the changes, the video demonstrates testing the new feature in play mode.

### Exploring the PowerFX Formula

The video concludes with a detailed walkthrough of the PowerFX formula, emphasizing its similarity to the 'Notify' function in Power Apps. Key points include:

- **Specifying the Confirmation Message**: Clearly define what the procedure entails.
- **Handling User Responses**: Implement actions based on the true/false outcome of the 'Confirm' function.
- **Implementing Notifications**: Use notifications to inform users about the success or cancellation of the operation.

### Conclusion

The tutorial ends by encouraging viewers to try adding confirmation pop-ups to their model-driven apps. The process is straightforward, requiring no JavaScript and only a basic understanding of PowerFX.

Don't forget to check out the [Pragmatic Works' on-demand learning platform](https://learning.pragmaticworkstraining.com/freeTrial/MarketingSiteODLTrial) for more insightful content and training sessions on Azure and other Microsoft applications.

Be sure to like and subscribe to our [YouTube channel](https://www.youtube.com/@PragmaticWorks/videos) to stay updated on the latest Power Apps tips and tricks.

[View full post](https://pragmaticworks.com/blog/enhance-model-driven-apps-with-powerfx-creating-pop-up-confirmations)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Nate Halliwell"
  },
  "dateModified" : "2024-01-02T17:00:01.167Z",
  "datePublished" : "2024-01-02T17:00:00Z",
  "headline" : "Enhance Model-Driven Apps with PowerFX: Creating Pop-Up Confirmations",
  "image" : {
    "@type" : "ImageObject",
    "height" : 450,
    "url" : "https://blog.pragmaticworks.com/hubfs/Create%20Pop-up%20Model%20Driven%20App.png",
    "width" : 900
  },
  "mainEntityOfPage" : "https://pragmaticworks.com/blog/enhance-model-driven-apps-with-powerfx-creating-pop-up-confirmations",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60.0,
      "url" : "https://blog.pragmaticworks.com/hubfs/PW%20Logo-2.png",
      "width" : 217.56097
    },
    "name" : "Pragmatic Works Blog"
  }
}
```