Date tip published: | 06/03/2002 |
Description: | Debug hidden fields easily with this quick tip. Hide and un-hide all the hidden fields on your forms by just changing the value of one formula on the form. |
To learn more about hidden fields use the following links:
R5 Application Development 1 for Notes and Domino
R5 Application Development 2 for Notes and Domino
R5 Application Development 3 for Notes and Domino
Introduction:
Almost all Notes/Domino developers use hidden fields to store information that is not seen by the user. When you are developing the application you may need to see what is in these hidden fields when testing and debugging. Many developers will hide a portion of the form (and the fields in that portion of the form) by checking off the boxes in the hide-when properties like in the image below or by checking off all the checkboxes such as Opened for reading, Opened for editing:

This makes it hard to easily hide and un-hide all the hidden fields on the form. The developer has to highlight each block of hidden text and fields and check off the boxes to show the hidden fields. Then repeat this step to hide them again.
This tip will demonstrate an easier way to hide the fields by using a formula for the hide-when properties that refers to a field which controls if the hidden fields are shown or not.
Tip Procedure:
1. Create a field called "productionstatus" (or any other name of your choosing.) The value of this field will be either @false (to see the hidden fields) or @true (to hide the hidden fields.) Make this field a computed for display field. Do not use any other type of field since then the value of this field will be stored in the documents in the database. For the formula choose either @true or @false depending on if you want to initially see the hidden fields.
2. Hide this field by using the "Hide paragraph if formula is true" option and entering @true to always hide this field. Do not use the field name as the value for hiding this field.

3. Now hide the rest of the hidden fields and hide them using the formula Productionstatus (or whatever you named the field in step 1) in the formula for "Hide paragraph if formula is true".

4. To put the form into "debug mode" and see the hidden fields modify the productionstatus field to be @false. To hide the fields on the form change this field to be @true.
 |