How to Show a Notification on a Web Page?
Learn how to show a message on a web page

While working with a web application, the user sometimes needs to receive feedback messages, for example, about successful saving/updating of data, completing some processes, or an error that occurred.
Block to display messages in AppMaster
The Show Notification block is responsible for displaying messages in AppMaster web applications. You can find it in the frontend BP editor, under App Action.

With this block, you can customize the title and text of the message, the type of message, choose where to place the message on the page, and the length of time for which the message will be displayed. You can manually or dynamically set a value for each of these parameters by creating your custom logic.
Practical example
Let's look at one of the most commonly used cases of working with notifications. We will display a message to the user after he tries to log in to the application. If the authorization is successful, we will display a statically defined message:

Otherwise, we will dynamically display the error that prevented the user from logging in:

This is what the final result might look like:


Conclusion
We now know how easy it is to work with web page messages in AppMaster. Learn more useful information about working on the platform in our Help Center.
FAQ
Use the Show Notification block in the frontend Business Process editor. You can find it under App Action and connect it to the event that should trigger the message.
The block lets you set a title, message text, notification type, page position, and display time. You can enter values directly or pass values from your business process.
Add the Show Notification block after the action that saves, updates, or completes a process. Write a short confirmation such as “Changes saved” so users know the action worked.
Connect the notification to the error path of your login or other action. Pass the error text into the message field so the user sees why the action did not finish.
Use a fixed message when the wording should stay the same, such as a successful login notice. Use a dynamic value when the text depends on the result, such as an error returned during authorization.
Place the Show Notification block in the frontend BP that handles the user action. A notification belongs in the web interface flow because it gives feedback directly on the page.
Set the position in the block’s parameters. Choose a location that does not cover the form, buttons, or other controls the user may need next.
Set the display duration in the Show Notification block. Keep success messages brief, but give users more time to read error messages with useful details.
Keep the title and text short, and tell the user what happened or what they should fix. For errors, use the actual error message when it gives clear guidance.
Yes. The same block can report a completed process, an updated record, a failed request, or another result from your frontend business process.


