This blog will discuss how to display a success message without navigating to another screen and redirect the navigation with delay using Timer control.
Business Requirement
We had a requirement to display a success message once data are saved, and the screen should navigate to the display screen automatically. Also, the user can navigate to other screens if needed.
Solution
-
- Add a Timer to the screen and set the properties
- Set Screen Property
- Set Action on Save Button
- Create Success Message Layout
Variable(s) is an important part for this use case
Timer Control in Action
- Display custom message
- Screen display the message for 5 seconds
Add a Timer to the screen
This timer helps to stay on the same screen while displaying the success message. Here are the few properties that need to be set.
- Add the Timer control to the screen
- Set Timer Properties
Screen Property
Set the screen on the visible property for variable initialization
Save Button
Set a few variables on click of the save button like the Submit form, Start Timer, and Display Success screen.
Create Success Message Layout
- Rectangle – Background
- Label – Display Success Message
- Button – Navigate to “Power BI” (Additional functionality)
Thanks, can we do this in model driven apps?
Yes, it’s possible but need to write some web resource to display the message and control it.