|
|
Supplying default answers to questions will make programming run faster and help the data entry person know what the usual response is to a question. Here are some tricks I use to do this in my filePro databases. WHEN PROCESSING
This will put a value in field 5 as the field is approached during data entry. The user can see the default before they leave the field and press <ENTER> to go to the next field. I like this better than after the fact defaults that fill in fields after the screen is displayed. You might add a routine that checks all the fields that should have defaults applied and fill in any that are blank when the record has been saved. I have also seen this routine run before the data entry begins. That would replace the need for the @wef processing. This routine might look like this:
This would catch any that you did not move through during data entry. Just activate this routine before ending the input processing for this record. I often use the control file for the system to enter common defaults, and lookup these defaults and supply them as prompts when the question appears.
Use a variable for the input that is longer than the default or it will not wait for an answer. (Chalk this up to experience. Use 2 character, Yes/No, Dates are tricky.) The data entry person can press <ENTER> to accept the response, or type over it with a change. This is very handy. Version 5.0 added a great way to simply the supply for a default. Instead of using pushkey, change the INPUT POPUP line as follows: input popup ys(5,.0,g) "Year to Select: " default yr This will allow a default answer to be more easily supplied. It can be any expression, so a literal or variable can be used to supply the prompt. This works great for Yes NO questions because you can supply the value that is your default to insure the user knows what to expect if they just press ENTER. Another way to supply answers is to put answers to the question on the command line. This will allow the report to be run manually or as an unattended batch file. For example, /fp/dreport file -f report -v scan -a -r "YY1234" In the scan table:
This should give you an idea about how this might be used to make the same report unattended with some default answers supplied on the command line. Written by Nancy Palmquist at nlp@vss3.com Copyright, 1997 by Virtual Software Systems. All rights reserved.
|