I have process with start form and in that form I have rule which I needs to run on button click and if that rule returns true I need to display a Error message on the page and disable the button(not allow the process to start). I tried using the rule on submit parameter to change from true to false if validation fails but it's not working. Once I set the submit, it's not changing dynamically. Also, the process is starting as soon as I click the button and then validating the rule.
Basically, I don't want the form to submit on button click if the rule returns True. Any suggestions?
Thanks,
Varsha
Discussion posts and replies are publicly visible
You can probably make use of the (sadly) lesser-known validation function, a!validationMessage, using the "SUBMIT" setting for the validateAfter parameter. This would go in a section-level and/or form-level validation, and should allow logic to be executed that would prevent the form from submitting and show your validation message.
Can you please elaborate a bit more or Provide a code snippet?
Did you happen to read the example code contained within the Appian Documentation page I linked above? I was figuring it's pretty self-explanatory. If you have any subsequent questions then I'd actually suggest you post a code snippet and I can help you troubleshoot.
Thanks!! it works.
Hi Varsha,
We do have a similar requirement. Can you please post your sample code snippet , how you have achieved this will be helpful.
Thanks in advance!!!
It didn't work the way I wanted, but it could help if the parameters I am passing to the rule is changing. In my case, it was not evaluating the rule on button click. I don't have the code to post but you can refer to the a!validationMessage documentation.