Welcome to Community Dynamics! NEW POST!

PowerApps - Design Popup/Dialog to display Error/Warning Message

Arpit Shrivastava
7,518 | User Group Leader | Follow | Like(0) | Share | Report

One of the most common requirement in any application/project is to Show Error/Warning Messages.

Currently In PowerApps, there is no direct way to show popup/dialog box in order to show any information/warning/error message to end users.

Today, as part of "PowerGuide Mentorship Program", I am going to give you PowerGuide - Tip3 where we'll learn, how to design Popup/Dialog Box in Canvas Apps

Let's get started...

Step 1: Create a Blank Canvas App > Connect with Dynamics 365 Data Source > Connect with Lead Entity

Step 2: Add few Text Inputs and Button Control to design the Screen for Lead Creation

Step 3: Add few Controls like Labels and Icons in order to design Popup/Dialog Box.

Step 4: Declare Variable and Manage the Hide/Show of Popup/Dialog

Let's understand the Logic to Show/Hide Popup/Dialog in 3 Steps:

  • Set Popup/Dialog Visibility toFALSE On Load of Screen.
  • OnClick of Submit Button, Check if lead of entered emailaddress already exist in D365, if Yes, then Set Popup/Dialog Visibility toTRUE elseFALSE.
  • OnClick of Close icon (X) inside dialog box, Set Popup/Dialog Visibility toFALSE.

Note : Here Popup/Dialog is the Collection of various Controls that we are using to design the Popup/Dialog. That means, hiding the Popup/Dialog means you'll have to set all the controls Visibility to FALSE that has been used to design the Popup/Dialog and Showing the Popup/Dialog means you'll have to set the same controls Visibility to TRUE.

Keep all the Popup/Dialog Box Controls Visibility to False on Load of Screen

If Lead of same emailaddress already exist, then Set Popup/Dialog Box Visibility to True else False

Set Variable to Popup/Dialog Box Control's Visible Property. In above screen, I have set Variable to only errorMsglabel (as shown in highlighted screen). However, you have to do the same for all the Controls that you are using to design the Popup/Dialog Box

Step 5: Set Visibility of Popup/Dialog Box Controls on Button Click.

Hide All Popup/Dialog Box's Controls on (onSelect) property of Close Icon

Step 6 - Run the App

Hope this Tip helps someone to incorporate various requirements.

Stay Tuned for my next Tip - PowerGuide - Tip4 as part of PowerGuide Mentorship Program Series

Cheers

This was originally posted here.

Comments*This post is locked for comments

Best viewed in IE Best viewed in Netscape
Under Construction New! Generate your own 90s page here! Under Construction