开发者

Lotus notes document saved with mendatory field missing

Here is the definition of my problem. I have a Notes application which opens a Form using the formula @DialogBox. In that form, I have a field which is mandatory by its input validation usign this formula:

@If(NotificationTitle = ""; @Failure("The Title field is mandatory...") ; @Success)

Pretty simple uh?! Now the problem is, SOMEHOW, SOMEONE did SOMETHING and got that document saved with empty value. Anybody has an idea on how he could have done that? I know that wonderful phrase that says "90% of the clients are idiots", but how can you save a document with mendatory fields empty? The problem is that this empty field made the whole web-based application down. We don't want it to happen again, so we'll probably put a cond开发者_JAVA技巧ition on the column of the view to show something when it's empty, but I wondered how it could have been empty.

Any idea?


You say it is a web-based application. The input validation only works on the client side. Perhaps the bad value was added on the web side?

Also, there are many ways to add values to a Notes Document without being subject to input validation which only fires when the form is open. Notes Agents can alter item values. Also smart icon formulas can be setup to change field values. Any chance you can see who made the change? That would help narrow it down.


On face-value of the info you have provided, this sounds like the data is exclusively entered through the Notes client ? If so, try retesting your application, and put a blank space in the mandatory field. I suspect that it will pass, and save the details because it's not really blank, a space character is still a character. To validate "real" blank fields, try this

@If(@trim(NotificationTitle) = ""; @Failure("The Title field is mandatory...") ; @Success)

Note the @trim formula in the condition test, this will cleanse the field of redundant trailing and leading spaces whilst doing validation. You need to be explicit about empty fields.

If however, the user enters data via the web, you will need to add javascript to validate this on the client side, and, you can use a "webquerysave" agent, to test on the server prior to saving the data. There is quite a bit of info on the web about using webquerysave agents, some good sources can be found here and here.

Finally, check the AutoReload property and reload method of the NotesUIdocument as there is some un-intuitive behaviour for it as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜