HTTP Web Server: Lotus Notes Exception - Incorrect data type for operator or @Function: Number expected [/db.nsf/main?openform] - How do I determine where on the form this error is?

I have hundreds of fields on the form, and a user has put in some bad data * somewhere *. I find it hard to believe that Notes can’t tell me where the problem is other then “uhhhhh… something bad happened”

Subject: HTTP Web Server: Lotus Notes Exception - Incorrect data type for operator or @Function: Number expected [/db.nsf/main?openform] - How do I determine where on the form this error is?

Another possibility is to “Create” the form in the Notes Client via the “Create” menu. The client usually does tell you what field is bombing. This is dependent, however, on whether the context of your formulas carry over well (or at all) from the browser to the client.

Subject: HTTP Web Server: Lotus Notes Exception - Incorrect data type for operator or @Function: Number expected [/db.nsf/main?openform] - How do I determine where on the form this error is?

I did find the problem eventually, though through brute force slogging. Good error messages are vital to debugging, hmmm?

Subject: RE: HTTP Web Server: Lotus Notes Exception - Incorrect data type for operator or @Function: Number expected [/db.nsf/main?openform] - How do I determine where on the form this error is?

As is error trapping – any formula can be written to accommodate “bad” data, particularly in Notes 6 Formula Language.

Subject: HTTP Web Server: Lotus Notes Exception - Incorrect data type for operator or @Function: Number expected [/db.nsf/main?openform] - How do I determine where on the form this error is?

My quick and dirty approach to this sort of thing is to trash a bunch of fields from the design until you’re able to identify the specific field causing the problem. I do this by creating several copies of the form design (be sure to keep a pristine backup of the original, however). I then delete all of the bottom half of the form and see if that makes the problem go away. If so, then I know the problem is there - I’ll then cut off half of the bottom part of the form and repeat the process until I’ve hit on the field causing the problem. But right away you should be able to narrow the field, so to speak, by looking at your numeric fields.