这是我的问题的定义。我有一个 Notes 应用程序,它使用公式 @DialogBox 打开一个表单。在这种形式中,我有一个字段,它的输入验证必须使用以下公式:
@If(NotificationTitle = ""; @Failure("The Title field is mandatory...") ; @Success)
非常简单啊?!现在的问题是,不知何故,有人做了某事并以空值保存了该文档。有人知道他怎么能做到这一点吗?我知道“90%的客户都是白痴”这句美妙的话,但是如何保存一个必填字段为空的文档呢?问题是这个空字段导致整个基于 Web 的应用程序瘫痪。我们不希望它再次发生,所以我们可能会在视图的列上设置一个条件,以便在它为空时显示一些内容,但我想知道它怎么可能是空的。
有什么想法吗?
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 condition on the column of the view to show something when it's empty, but I wondered how it could have been empty.
Any idea?
发布评论
评论(2)
你说它是一个基于网络的应用程序。输入验证仅适用于客户端。也许不好的价值是在Web端添加的?
此外,有多种方法可以将值添加到 Notes 文档,而无需进行输入验证,输入验证仅在表单打开时触发。注释 代理可以更改项目值。还可以设置智能图标公式来更改字段值。您有机会看到谁做出了更改吗?这将有助于缩小范围。
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.
从您提供的信息的表面来看,这听起来好像数据是专门通过 Notes 客户端输入的?如果是这样,请尝试重新测试您的应用程序,并在必填字段中添加空格。我怀疑它会通过,并保存详细信息,因为它并不是真正的空白,空格字符仍然是字符。要验证“真实”空白字段,请尝试此操作
注意条件测试中的 @trim 公式,这将在进行验证时清除冗余尾随和前导空格的字段。您需要明确说明空字段。
但是,如果用户通过网络输入数据,您将需要添加 JavaScript 来在客户端验证这一点,并且您可以使用“webquerysave”代理,在保存数据之前在服务器上进行测试。网上有很多关于使用 webquerysave 代理的信息,可以找到一些很好的资源 此处 和 此处。
最后,检查 AutoReload属性并重新加载 rel="nofollow">NotesUIdocument 因为有一些
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
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.