Hello everyone,
I'm currently working on an application where I need to display error messages from differents screens in a popup. I've been considering utilizing the popup hosted in the menu layout for this purpose. However, I'm unsure whether this approach is feasible.
The inputs parameter for this functionality would include the popup title, the error message, and a boolean value to control its visibility.
Could anyone kindly advise if it's possible to achieve this within OutSystems?
Thank you in advance for your assistance and insights!
Best regards,
César DÃaz
Hi Cesar,
Hope you're keeping well!
As per my knowledge, the scope of a popup is inside a screen/block. So, apparently you can't create single pop-up for different screens. But you can very well create this same functionality.
Create a common block. Use the same block in every pop-up. The error message will be the same if you pass the same parameter to the block.
Best Regards,Ananya
You can indeed implement a popup as described: 'Design a popup within a Menu block with three parameters: Title, Message, and ShowPopup and design your popup content inside it.'. You'll need three variables, which will be bound to the Menu block on every screen. When you wish to display a message, simply set these variables, and the popup will appear.
I am not able to access from another screen to the inputs in the popup block
Please find attached a reference implementation.
Create a Popup: First, create a popup in your application, preferably in the menu layout so that it's easily accessible from different screens.
Define Input Parameters: Define input parameters for the popup component. These parameters should include the popup title, error message, and a boolean value to control its visibility.
Show the Popup: From any screen where you want to display an error message, call a server action to set the input parameters of the popup (title, message, visibility) and then show the popup.
Customize the Popup Content: Customize the popup content to display the provided title and error message.
Control Visibility: Use the boolean parameter to control the visibility of the popup. Set it to true to show the popup when there's an error and false to hide it when it's dismissed.
Hello
In your menu layout, create a popup. This popup will be used to display error messages.
Add input parameters to the popup for the title, error message, and boolean value to control its visibility.
Create a client action to show the popup.
This action should set the input parameters of the popup with the provided title, error message, and visibility control boolean.
From any screen where you want to display an error message, call the show popup action you created.
Pass the title, error message, and boolean value to control visibility as input parameters.