Outrageous lie in Notes 6 help - field validation on web

According to the notes help:-@Success and @Failure work in field input validation formulas on the Web. The @Failure path causes the message specified as the parameter to appear on a new page. In the following validation formula, if the user fails to enter a value for RequiredField, the word “Gong” in bold appears on a new page:

I’d just like to point out to everyone that this is absolute RUBBISH! @Success and @Failure both don’t work on the web. Any input validation you put are simply ignored, both at run time and when submitting a document. Secondly, there is two examples in the help:-

@If(RequiredField = “”; @Failure(“Gong<\B>”); @Success)

You can make the failure page more meaningful by using more extensive HTML in the error message:

msg1 := “This is a required field.

”;

msg2 := “<a href=/” + @WebDbName + “/Main+Document?OpenForm>”;

msg3 := “Click here to try again.”;

msg := msg1 + msg2 + msg3;

@If(RequiredField = “”; @Failure(msg); @Success)

Neither of these examples work - they are both entirely ignored by the web browser.

LOTUS TAKE NOTE!!

p.s. Does anyone have a simple validation formula, preferably one that works up front (e.g. not just when submitting/saving the document?) And doesn’t involve JavaScript as long as my arm? Even if I could just validate one field (e.g. If this field is blank, display an error and prevent submission)that would do (better would be to work out the length and make sure it’s 8 characters…)

@Prompt doesnt work on the web, nether does @Picklist, @Success, @Failure…

Subject: Outrageous lie in Notes 6 help - field validation on web

Yes, they do work on the web. In fact, I just tested the very formulas you said didn’t work, and they ran exactly as the documentation would lead you to believe. There are, though, things you may have done which can bypass or fail to invoke field validation. What other processing are you doing to the document and how are you submitting it? For example, are you using a WebQuerySave agent? Do the commands that you’re using to submit the document, in fact, attempt to save it?

Subject: RE: Outrageous lie in Notes 6 help - field validation on web

Stand corrected…OK thanks Andre and Mary…

The last comment

“What other processing are you doing to the document and how are you submitting it? For example, are you using a WebQuerySave agent? Do the commands that you’re using to submit the document, in fact, attempt to save it?”

Is the most true - my button is actually sending an email. (confusingly it’s called a submit button), and the form appears to have a SaveOptions of 0…

Andre,

I will also bear in mind your comment - that they execute ONLY when saved - therefore if it’s not saved, I guess they will never be executed…

I’ll build in some LS to the agent sending the mail to stop working when the field is blank or not eight characters…

ta…

Subject: Outrageous lie in Notes 6 help - field validation on web

Please take a deep breath. In. Out.

Input validation formulas do work in web applications, exactly as documented. I have used them many times. Admittedly they do not provide the slickest user interface, and these days I prefer JavaScript or a little fancy technique that displays the validation messages on the reloaded form rather than a separate screen. Of course since the browser doesn’t know how to execute macro language, input validation formulas can only be executed by the server after the form is submitted.

If this doesn’t seem to be working for you, then your formula isn’t correct.

@Picklist and @Dialogbox don’t work on the web, but this is documented. And people have written articles about how to add these capabilities to your apps. Go search them out.

As far as a simple JavaScript validation, this question has been answered before in these forums. I’m in a rush right now – please have a look for them yourself.