Domino Upgrade

VersionSupport end
5.0
6.0
6.5
7.0
Upgrade to 8.5x now!
(see the full Lotus lifcyle) To make your upgrade a success use the Upgrade Cheat Sheet. Contemplating to replace Notes? You have to read this!

Search

Reference

1. Learn XPages online
2. Communicate with IBMers and Lotus Experts using Sametime

About Me

I am the "IBM Collaboration & Productivity Advisor" for IBM Asia Pacific. I'm based in Singapore.
Reach out to me via:
Follow notessensei on Twitter
(posts)
Skype
Sametime
IBM
Facebook
LinkedIn
XING
Amazon Store
Amazon Kindle

Mobile tag

Twitter

Languages

Other languages on request.

Visitors

Useful Tools

Get Firefox
Use OpenDNS
The support for Windows XP is coming to an end and has . Time to consider an alternative to move on. sounds like a lot of time, but, like an object in a mirror, it is closer than you think.

« To REST or to SOAP for mobile applications? | Main| Tony Buzan Power Learning Camp in Singapore »

View hidden fields while debugging.

QuickImage 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

Gravatar Image1 - @Michelle: I think changing the design is not really an option when troubleshooting a production system. For your situation you might opt for a Environment variable. So you would code @if(@Environment("IsDebugMode")="Debug";@false;@true). You can use an action bar button to set/reset your environment variables. Of course this would work for client apps only (unless the admin types SET config IsDebugMode=Debug for you at the console).
stw

@Slawek: haven't tried that

Gravatar Image2 - What if you put the hidden fields layed out in a table into a section with a hide-when set to evaluate the IsnNtDebug?

Gravatar Image3 - I use a section also, but set the section to always hide. If you put the hide-when on the section but not the section contents, you can show all your hidden fields by opening the section and hide them by collapsing the section on your form.

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.

Gravatar Image4 - Hi,iam satish from hyd,i am learning lotus since from last sept,am not good in webusing so please inform any good sites for lotuscoding and
if i have any doubts in lotus through which site ihave to go .kindly inform me

Gravatar Image5 - I am using very similar approach with a minor difference. In some environments it might be difficult or time consuming to make changes in the ACL. Thus I am using a database profile to keep two fields. One is the list of roles that can see the hidden fields in debugging mode (to avoid hard codding) and the second one is there just to switch on/off the debugging mode.

Post A Comment

Please note: Comments without a valid and working eMail address will be removed. This is my site, so I decide what stays here and what goes.

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::rolleyes:;-)

Disclaimer

This site is in no way affiliated, endorsed, sanctioned, supported, nor enlightened by Lotus Software nor IBM Corporation. I may be an employee, but the opinions, theories, facts, etc. presented here are my own and are in now way given in any official capacity. In short, these are my words and this is my site, not IBM's - and don't even begin to think otherwise. (Disclaimer shamelessly plugged from Rocky Oliver)
© 2003 - 2012 Stephan H. Wissel - all rights reserved as listed here: Creative Commons License
Unless otherwise labeled by its originating author, the content found on this site is made available under the terms of an Attribution/NonCommercial/ShareAlike Creative Commons License, with the exception that no rights are granted -- since they are not mine to grant -- in any logo, graphic design, trademarks or trade names of any type.