Hidden Fields in the Lotus Notes Client
Here's a little trick I've been doing for a while now. Often to carry out system support I'll need to check the value of a field that is hidden from the user interface. There is the old faithful Document Properties dialog box, but it is a little fiddly, tiny text and viewable area and little scroll buttons.
So now I do this. I have my system fields at the top of a form. I lay them out in a table, label them and add any context I need, and then group them together in ways that makes sense for their functional use. By default this top of the form is hidden, but a I have a form action (displayed only for an administration role) that toggles the section open and closed. You can see the form action in the far right of the button bar, its just an icon with some arrows.
The hidden fields section in its default closed state.
The open hidden fields section.
The code to do this is pretty basic. There's a number field hidden above the tables of system fields. It defaults to 1 (which is @True). It is also reset to a value of 1 on QueryOpen.
Call source.Document.ReplaceItemValue("HideAdvanced", 1)
The hidden fields section in design mode.
The buttons with the expander icons (the arrows down and arrows up) are then set to hide based on the value of HideAdvanced, the field. I also have a check for a user role @Contains(@UserRoles; "SystemAdmin"). The buttons simply hide or show the table by changing the value of the HideAdvanced field and then refeshing the document.
'show advanced fields Call docThis.ReplaceItemValue("HideAdvanced", 0) Call uidThis.RefreshHideFormulas 'hide advanced fields Call docThis.ReplaceItemValue("HideAdvanced", 1) Call uidThis.RefreshHideFormulas