setting high date and PFCMARK
Jose Lerebours
fp at fpgroups.com
Thu Apr 9 09:20:04 PDT 2009
Richard D. Williams wrote:
> Try this;
>
> If: dl ne ""
> Then: end
> If: q ne ""
> Then: goto start
> if:
> Then: cls
> If:
> Then: input fa(4,#,g) "From Client Number "
> If:
> Then: input fb(4,#,g) "From "<fa<"to number "
> If:
> Then: input ff(8,mdy/,g) "Enter 1st date"
> If:
> Then: input ll(8,mdy/,g) "From"<ff<"to what ending date"
> If: fa eq " " or fb eq " " or ff eq "" or ll eq ""
> Then: msgbox "No Report Created!";exit
> If:
> Then: input popup ("22","") q(1,yesno,g) "Is this correct? (Y/N)";cls
> If: q ne "Y"
> Then: msgbox "No Report Created!";exit
> If:
> Then: lookup - k=ff i=h -ng
> *start*: If: 18 gt ll
> Then: goto endit
> If: 1 ge fa and 1 le fb
> Then: select
> If:
> Then: end
> *endit*: If:
> Then: dl(8,mdy/,g)="12/31/79"
> If:
> Then: lookup - k=dl i=h -nl
> If:
> Then: end
>
The first two lines of code should keep the script from asking the questions
and performing the lookup more than once.
I would make two changes
(1) Add
if: not -
then: end
right after the original lookup.
(2) Additionally, I would not use a hard coded date to jump to
possible last date, simply add a couple of years to end-date
then: dl(8,mdy/,g)=ll+"1095" 'Add 3 years to end date
By adding the three years to end date, no matter what your PFCMARK is set,
it is less likely that your code will break (should it be ported to a
different
environment or PFCMARK have an unexpected value).
Regards,
Jose Lerebours
954-559-7186
http://www.fpgroups.com
More information about the Filepro-list
mailing list