Can any please explain ?

Kenneth Brody kenbrody at spamcop.net
Thu Jun 26 07:32:44 PDT 2014


On 6/25/2014 10:04 PM, 'Scott Smith' wrote:
>
> Can some please tell me why:
>
> IF (Input table)
>
> @wlfd3::dd (30,*) = draw(@af)
> :dd eq "Bank" : draw(@af) = "Bank Cheque"; display
> ::end
>
> And in Screen if
>
> The d3 field is entered as : "Bankorsomething name "
>
> Then it changes to "Bank Cheque"
>
> The dd should be the whole field yet the equals is only seeming to compare
> the starting first part of the field.

Because you are only comparing to "Bank", filePro only compares the first 4 
characters.  Just as if you tried LastName="B" would be tru for all last 
names starting with "B".

If you need to compare the full 30 characters, you need to compare two 
30-character fields.

For example:

Then: dd(30,*) = draw(@af) ; zz(30,*) = "Bank"
   If: dd = zz
Then: draw(@af) = "Bank Cheque" ; display

There are other methods, such as simply:

   If: dd = "Bank                          "

or

   If: dd = doedit("Bank","*","30")


-- 
Kenneth Brody


More information about the Filepro-list mailing list