Problem solve Get help with specific problems with your technologies, process and projects.

Keeping an editable number field blank in a Lotus Notes document

SearchDomino.com expert Cregg Hardwick explains how to keep an editable number field blank (not zero) when a user edits a Lotus Notes document.

How do I zero suppress, or leave number fields blank if no numbers are entered by the user on a Lotus Notes-based form. I don't know LotusScript very well, but I sure could use your help with this. How do you keep an editable number field blank if no numbers are entered by the user? I want to have it show U.S. dollars only if a value is entered.

If I understand you correctly, I would not use LotusScript at all. Let's say you have a document containing a numeric field called "Dollars." You want the field to appear blank (not zero) when the user edits the Lotus Notes document. You could just add an input translation formula to the dollars field like this:


Of course, this will change the value of the field if the document is saved. However, in Lotus Notes, you should be designing all views, agents, etc., to expect numeric fields to sometimes have a null string value, since that's what Formula language returns when you access an uninitialized field.

But, if that's not possible, you could create a "shadow" editable field and make "dollars" hidden so that "dollars" actually gets updated only if the shadow field is changed.

To detect when a field changes, use another hidden "check" field. Place a hidden, "computed for display" check field at the bottom of the form with its value set to its own name. Then add code (either Formula language or script) to the form's post-recalc event that detects when this check field and your editable shadow field have different values, and sets the dollars field and the check field appropriately.

Do you have comments on this Ask the Expert Q&A? Let us know.

Dig Deeper on LotusScript



  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...