Manage Learn to apply best practices and optimize your operations.

ComputeWithForm clashes with @DBLookup formulas

LotusScript ComputeWithForm method (NotesDocument class) causes @DbName formulas to fail

Over two years ago, Douglas Findley submitted a tip here that dealt with the fact that the LotusScript ComputeWithForm method (NotesDocument class) causes @DbName formulas to fail. He concluded his tip with the hope that this issue would be fixed in R5.

I can report that it has not. I recently ran into a situation in which ComputeWithForm caused @DbLookup formulas to fail (on R5.0.8). The really irritating thing to me was that each faltering formula calculated the value of a computed field (i.e., not a Default Value, Input Translation, or Input Validation formula).

I was using ComputeWithForm to fire Input Translation formulas in fields that received upper case text values from an external data source. My solution was to remove both the ComputeWithForm call and the @ProperCase(fieldname) formulas and rely on a custom function that returns a proper case version of the passed in text value(s). You could also use "Evaluate( | @ProperCase(textvalue) | )" to format the uppercase text values. I choose to use a custom function because @ProperCase does not handle generational suffixes very well (e.g., "III" becomes "Iii").

Based on what I've been able to glean, others have had similar difficulty with different sorts of @Db... formulas and ComputeWithForm. When it's all said and done, the best thing to do is proceed with extreme caution when invoking the ComputeWithForm method against a document containing any kind of @Db... formulas.

Dig Deeper on Lotus Notes Domino Administration Tools

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...