Confirmation message does not appear

We use confirmation messages on buttons to remind our users that their information will not be saved if they navigate away from a form on our mobile app. We recently added a "Back" button to the HeaderRight section of a few of our screens to go send them back to a screen that contains a list of relevant records. 

For some reason the confirmation message does not appear on these buttons in particular. Buttons produce a confirmation message when they are placed in the Content area of the screen layout, but for some reason not in HeaderRight? Is there something I can do to fix this?

Instead of linking the button directly to the screen they have to go back to, you might wanna link it to a screen action that will do any checks you need to do and show an alert or a modal or whatever you want to use? 

Are the other buttons you mention by any chance on the same Form which is being checked?

Hi Jared,

Confirmation messages on buttons are produced inside the HTML, so after the Preperation has run. Any changes to the variables used inside the confirmation message won't take effect until you perform an Ajax Refresh.

In the case of a back button in a header, note that the header Web Block is processed before the Preperation of the main Screen that includes the Web Block. So in case the back button contains any information that is set in the Preperation (which can only be Session Variables, or input variables to the Web Block), the information is outdated and may cause the confirmation message to not trigger.

Hii Jared Slayton,

As per your comment understanding i am sharing an URL in which you can see the  success and failure message

on button click and Header-Right navigation Icon click. Do let me know your concerns for solution.


https://dipa-tiwari.outsystemscloud.com/PreviewInDevices/?IsMobilePreview=True&DeviceName=Smartphone&URL=/TestApp/ConfirmationMessages?_ts=637093611529538691

Kilian Hekhuis wrote:

Hi Jared,

Confirmation messages on buttons are produced inside the HTML, so after the Preperation has run. Any changes to the variables used inside the confirmation message won't take effect until you perform an Ajax Refresh.

In the case of a back button in a header, note that the header Web Block is processed before the Preperation of the main Screen that includes the Web Block. So in case the back button contains any information that is set in the Preperation (which can only be Session Variables, or input variables to the Web Block), the information is outdated and may cause the confirmation message to not trigger.

Kilian, apologies - this is in a mobile app, so there is no ajax.

Ah, ok. But still the same mechanism holds, if you put anything in a Block Parameter that triggers (or not) the message, you need to handle the OnParametersChanged of the Block to refresh it.

Mariano Picco wrote:

Instead of linking the button directly to the screen they have to go back to, you might wanna link it to a screen action that will do any checks you need to do and show an alert or a modal or whatever you want to use? 

Are the other buttons you mention by any chance on the same Form which is being checked?

Mariano, the other buttons that work properly are inside a Web Block. Previously I also had a button that worked inside the content area,i think it was inside the form but I am not sure. Is there something about being outside the form that would be a problem?


Hi Jared,

Like I said, it can be a refresh problem. Are there any conditions on the back button that cause it to display the confirmation?

Wrapping the buttons in a web block seems to make them function the way I want, so I used that as a workaround. Thanks to Kilian for explaining the order of operations, that was helpful.