Link - Confirmation only if Javascript variable = true

Link - Confirmation only if Javascript variable = true

  

Hi to all,


I work with links. In the On Click Function, we have Ajax Submit Method.

I want use validation only if javascript variable is true.

¿How can do it?

If (isModified) {

Validation

}

Thanks to all.

Hi Alberto De Vargas,

You can run javascript action in a screen flow, to validate what you need, then in case your condition is valid execute the action you need.

Take this document as a reference:

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/JavaScript/Extend_Your_Web_Application_Using_JavaScript/Define_and_Run_JavaScript_Code

Regards,

Hi,


You can do this:

It's this that you need?

Hope this can help! ;)


Best regards,

Ricardo

Ricardo Pereira wrote:

Hi,


You can do this:

It's this that you need?

Hope this can help! ;)


Best regards,

Ricardo

Hi Ricardo,

I need check Javascript Variable, not LocalVariable .


Thanks


Solution

Hi Alberto,

Here's another approach: leave the "Confirmation Message" property empty and use this in the link's extended properties:

"if (showMessage) { if (!confirm('Do you really want to delete this?')) { return false; } }"

Solution