ComputeWithForm clashes with @DBLookup formulas

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.


    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

This was first published in September 2001

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.