Tip

ComputeWithForm clashes with @DBLookup formulas

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.


This was first published in September 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.