The Right Notes

Contributing development ideas to the Lotus Domino community

Archive for June, 2007

Using the right tool for the job

Posted by therightnotes on June 12, 2007

We’ve been having a discussion internally among the Notes developers about how to best write hide-when formulas based on user roles.  There was a group who usually used @contains, but we have run into problems where the substring is Null, because then @contains always returns True.  I’ve always advocated using @ismember because it seems to be a more accurate function when I want to know whether or not a person is enrolled in a particular roll.

My supervisor, who is a brilliant coder, prefers to write hide-when formulas in this way:  write a formula for who should see the item, then make it a negative using the ! operator (and changing booleans as necessary).  I’ve always found this a bit difficult because my mind doesn’t work this way.  Also, I chafe at things like !@ismember when there is a function called @isnotmember.  I feel certain that the latter must be faster (albeit fractionally), and I find it easier to read.  I guess it’s just my feeling that we should try to use the tools given to us that are best suited for the task.

Posted in Lotus, Lotus Notes, Lotusnotes, best practices, formula language | 2 Comments »