View hidden fields while debugging.
A short one today. A typical pattern for Notes and Domino forms is to have hidden fields at the beginning and end of a form. These hidden fields store lookups, IDs, relations and all sorts of things. As a unwritten convention these fields are marked red and hidden from reading and editing (basically all hidewhen options are checked). While developing or troubleshooting applications it is important that you can see the values of these fields. So instead of checking all hide options I use the following approach:I create a hidden Computed For Display field of type number named "IsNotDebug". I put this formula in:
@IsNotMember("[Debug]";@UserRoles)
Then I use a formula in the hide when section: IsNotDebug. Is is kind of plain English: Hide when is not Debug.
By adding or removing the role [Debug] from your user-id you can switch on/off the display of the hidden fields. If you do a lot of local development, you might opt for a Environment variable instead of a role.
A final tip: To make things look better I often find hidden fields neatly put into tables with some explanations in the second column. This is not a good idea. Hide when formulas are executed separately for every paragraph in every cell. So you create a lot of extra computation. Best is to have the fields in a single paragraph (newlines with Shift-Control are ok). I use the pattern
Field : [the field] (Comment) | <-this could be just a bar or a new line.






Comments
@Slawek: haven't tried that
Posted by Stephan H. Wissel At 18:24:25 On 06/15/2007 | - Website - |
Posted by Slawek At 13:40:23 On 06/15/2007 | - Website - |
This does involve editing the form each time you want to debug, but avoids switching roles, which I sometimes find doesn't work well, and of course can be a problem when working on local replicas. In addition, at some customer's I only have Designer access to applications, not Manager.
Posted by Michelle At 14:53:00 On 06/15/2007 | - Website - |
if i have any doubts in lotus through which site ihave to go .kindly inform me
Posted by satish kumar At 23:51:33 On 06/17/2007 | - Website - |
Posted by Miroslav Navratil At 14:58:18 On 06/20/2007 | - Website - |