Manage Learn to apply best practices and optimize your operations.

Form debugging

Find the problematic field quickly - make your own version of a "break" or stop.

If you code with Lotuscript, you know can use the debugger or include a "Stop" line within your code to see HOW FAR your code is executing, to aid in debugging. The following is the same concept, but for a form.

PROBLEM:
Have you ever made several changes to a form or have a big form that suddenly will not open. You receive an error message and are thrown out of the form, so you do not really know where it's failing.

SOLUTION:
Geographically troubleshoot your form.

First, error trap all your @DbLookups and @DbColumns (duh). If this is a foreign concept, e-mail me.

Second, check your QueryOpen and PostOpen events for something funky.

Lastly, if you're still receiving an error that prohibits the form from opening:
-Half-way down on the form, create a Computed field on the form, incorporating a simple "OK" @Prompt.
-Test your form.

If you receive the prompt and then the error (then you're thrown out of the form), you know your problematic field is on the bottom half of the form (below your Stopper field).

If you receive the error first and are thrown out of the form, you know the problem is on the top half of the form (above your Stopper field).

-Continue simply cutting and re-pasting the Stopper field, repositioning it to hone in on your culprit field. (Remember, Notes reads top to bottom, left to right.)

If you get the error first, re-paste it 1/4th the way down on the form. Or, if you receive the prompt then the error, move it (the stopper field) to 3/4th's of the way down on the form. Keep moving it around until you narrow the problem to the exact line that is failing. Then cut and re-paste the field in front of each field.

This simple little technique can allow you "geographically" locate your problem field within minutes, vs. reviewing each field with a default formula or computed value or keyword field that has a formula, etc. (which sometimes, even though it might be my code, causes my eyes to glaze over).


Computed, Computed when Composed, or Computed for Display field with the value/formula is:

@Prompt([OK]; "Stopper"; "Stop/Pause")
This was last published in September 2001

Dig Deeper on Domino Resources - Part 7

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close