what should happen if

Kenneth Brody kenbrody at bestweb.net
Fri Nov 19 08:48:36 PST 2004


"Robert Pulliam M.D." wrote:
[...]
> CLM*INV1191*175***11::1*Y*A*Y*A*B~
[...]
> aa = mid(1,"8","8")
> aa then equals 1191*175
> 
> I then set ab(8,.0) = aa
> I expected this to give and edit error but ab was actually 1191.   This works
> fine for my purposes but I was surprised that it worked.
> When I test the .0 edit I cannot enter 1191*175 as expected, it only takes
> 1191.  The fact that this works prevents looping or using the instr function
> to extract the actual invoice number.  Is this expected behavoir?

Yes, this is expected.  When moving a non-numeric field into a numeric
field, filePro will take the initial numeric portion of the field and
use that part.  (ie: "1191*175" --> "1191", "123 Main Street" --> "123",
"Ken Brody" --> "0", and so on.)

> Is there a
> better way to extract the number from this field - the number following
> the INV may be between one and eight numbers.   This works for any of these.

I'm not sure what your problem is.  You say that "1191" is the invoice
number, and the ab ends up with "1191" as its value.

[...]

-- 
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody        | www.hvcomputer.com |                             |
| kenbrody/at\spamcop.net | www.fptech.com     | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap at gmail.com>



More information about the Filepro-list mailing list