|
|
TIP # 11 WHEN Data Entry FlowIt is helpful to recognize the flow control used during data entry in filePro. Most of us use the automatic (auto on DOS) and input tables to do processing, but many other levels can be used. Lets look at WHEN processing this week. WHEN processing is all associated to the data entry fields on a screen.
WHEN logic is a little snip of programming all to itself. When any of the following commands is executed then WHEN processing is finished. END, SKIP, ESCAPE, EXIT, SCREEN (Can't think of any more.) WARNING: If you execute any GOSUB commands from a WHEN, be sure that a RETURN is executed before the WHEN process hits one of the ending commands. This can cause "Too Many open GOSUB" errors or other OUT of MEMORY errors. If you changed data during the WHEN, I suggest that it end with the commands: DISPLAY;END Display will refresh the screen, END closes the When Process. If you use the common SCREEN,6 Option to finish the @WLF5 it will always move your cursor to field 6 when you leave field 5. If you press UPARROW, ESCAPE, TAB or any other keystroke that might jump in another direction, you will still move to field 6. I find this annoying, others I have talked to think this gives better control. After I have tested a system like this for a few minutes, I am ready to scream. Just my opinion and I am stuck with it. If you need to jump over a series of fields, when the first is left blank, use logic like this:
The wildcard version can be used of each of the above. It is executed if no specific WHEN logic is listed for the field.
Written by Nancy Palmquist at nlp@vss3.com Copyright, 1997 by Virtual Software Systems. All rights reserved.
|