I've always wanted to put notes on a layout that only the developer can see. I've thought of many solutions including a combination of scripts and calculations that make the notes visible when the full-access password is used, but this isn't simple or elegant. Of course, we all have developer layouts that users can't navigate to that contain information about the solution we've created. But, wouldn't it be nice to have notes right on the specific layout you want to describe?
Here's a simple trick to make notes appear in layout mode, but not in browse, find, or preview modes. In other words, users can't get to layout mode so they can't see your notes. Just type your notes wherever you want them to appear on the layout. Next, set the conditional formatting for the text block with the following formula:
Get(WindowMode) > -1
When the above condition is true, have conditional formatting change the text color to match the background so it disappears. The Get(WindowMode) function returns the following values:
Browse mode = 0
Find mode = 1
Preview mode = 2
Printing in progress = 3
Interestingly enough, when placing the Get(WindowMode) function in the Data Viewer, a value of "4" is returned while in layout mode. This is not referenced in the online help and really isn't helpful except in this scenario. If you run a script while in layout mode, it first changes to browse mode, so it is not possible to capture or test for a value of "4". So why does the conditional formatting formula return a false value if it is true that "4" is greater than "-1"? It's quite simple. When you enter layout mode, calculations do not formulate. In other words, the conditional formatting works in find, browse, and preview, but not layout mode. Otherwise, you would have to test for values ranging from 0 through 3, excluding 4.
-- Rob Poelking, Cleveland, Ohio