palmtree with sun behind it CONTACT US
Phone: (412) 835-9417
Email: sales@vss3.com

Tip #32 - Better INPUT Prompts

(From the session on filePro Programming Tips by Nancy)
In prompts for information make sure you are clear about the format of the 

data required.

If:  
Then: declare date(8,mdy/)
If:  
Then: Input popup date “Enter the Purge Date (mm/dd/yy) > “

Better yet offer a default right in the popup with new command. (5.0 only)

If:  
Then: declare date(8,mdy/)
If:  
Then: Input popup date “Purge Date (mm/dd/yy) > “ default boy(@td-"380")

boy(@td-"380")-"1"   - One day before the beginning of the year with the date 380 days before today.  Should be 12/31/00 assuming today is "02/18"02" or any date in 2002.

Another way to offer default information is to use PUSHKEY to type  the information. The field must be one longer than the data to use this method, since filepro will automatically accept the data without pressing ENTER if the field is filled.  That is why the yesno field was made 2 characters long instead of one.

If:  
Then: declare yesno(2,yesno);pushkey "Y[LTAB]"
If:  
Then: Input popup yesno "Do you want to boogie? (Y/N) > "

The answer Y will already be displayed in that field and pressing ENTER will accept the input.


Written by Nancy Palmquist

Copyright, 1997 by Virtual Software Systems.  All rights reserved.

Contact Us by: Email to Virtual Software Systems or Phone: (412) 835-9417