How to show confirmation box conditionally based on values in the screen?
Question

Hi All,

Currently I am trying to prompt user a confirmation box to ask if they want to close the request when the form is having certain values. But as far as I know that confirmation box can be set directly in the property field of the button, correct? I wish to have the confirmation box display conditionally means I dont want it to display whenever the user press the close request button. Is there any way to achieve that?

Hi,

Are you using the Confirmation Message field?

You can use the expression If(<your conditions>, "message", ""). If the message is blank the box will not be shown.

Peter L wrote:

Hi,

Are you using the Confirmation Message field?

You can use the expression If(<your conditions>, "message", ""). If the message is blank the box will not be shown.

 Oh I didnt know that the confirmation message field can be configured like normal IF statement! I will try it out anyway, thanks for your input :)

 

Hi Peter, 

this action not solve my case. 

don't know what happen my outsystems code can't  read expression code with condition of variable. 

so I try another way. 

this steps may can help the others who looking for. 

  1. Create new variable with text type. eg. confirmationString
  2. put confirmationString variable into Confirmation Message properties on your button (in my case)
  3. edit your logic to trigger value on variable confirmationString. eg. on text changed you need give confirmation message to users before save form. so add Assignment for variable confirmationString with your message. 
  4. then use AjaxRefresh to reload button configuration. 

so when you click save button with text changes, you will receive confirmation message before save logic running. 

hope will help

I'm use Outsystems 11 and build traditional web

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.