How To Quickly Improve Your Power Apps Model-Driven View Look and Feel
Enhance Model-Driven Apps with PowerFX: Creating Pop-Up Confirmations
Creating a modal pop-up in a model-driven app without using JavaScript has become simpler thanks to PowerFX. Nate Halliwell's 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
-
Accessing the Command Bar: The first step involves navigating to the command bar in the model-driven app's designer interface.
-
Editing the Main Grid Command Bar: Focus on the main grid's command bar, where the custom 'Decommission Items' button is located.
-
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.
-
Incorporating Alternate Data Sources: The necessity of bringing in alternate data sources like asset items is highlighted.
-
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).
-
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 for more insightful content and training sessions on Azure and other Microsoft applications.
Be sure to like and subscribe to our YouTube channel to stay updated on the latest Power Apps tips and tricks.
Sign-up now and get instant access
ABOUT THE AUTHOR
Nate Halliwell is a Power Platform enthusiast, specializing in Power Apps and Power Automate. He began his journey into the Power Platform as a “Citizen Developer” while working as a recruiter in talent acquisition. He used Pragmatic Works to train himself on the technology and hopes to use this new role as a trainer to help others achieve similar career transitions! Nate is PL-900 and PL-100 Certified, and ready to help you take on any Power Apps or Power Automate challenges you or your organization are currently facing! Outside of work, Nate is a husband, a father to 2 boys, and a beer league hockey player.
Free Trial
On-demand learning
Most Recent
private training
Leave a comment