The first thing that sticks out is:
Is CFPONUM/CF_PONUM text or integer??
I looks like CFPONUM is text an CF_PONUM is integer.
Sometimes it is referenced as text and sometimes a integer as well as
changed to text or integer. This could cause problems.
One line of code that sticks out to me is:
UPD CONFIG SET CF_PONUM =((INT(.VCFPONUM)) + 1)
If the user puts in a letter in any part of CFPONUM, CF_PONUM will return a
1.
Try this at the R>
set var vpo int = (int('C123')) --returns zero
So your update command would always set CF_PONUM to 1.
It looks like in the beginning you are trying to account for this
text/integer problem.
Looking at the beginning of your code, what happens if VCFPONUM is text that
contains a letter?? Then it gives you the error message which is captured.
So then it never increments.
It looks like in the beginning you are trying to account for this
text/integer problem. I would start by changing them all to integer(if that
met the user requirements).
I hope this helps.
Dan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Dennis
Fleming
Sent: Saturday, January 24, 2004 7:49 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Why we love this job
Thanks Dan,
On the Add form, when the user clicks the Add button the row is added. An
EEP is run "After Saving Row" which updates the PO number. This is some old
and not very elegant but it's been working for quite a while at a number of
plants. (The user is allowed to change the next available PO number to
something else. Note: Incrementing a number as shown below is not mutli
user friendly.)
-- PONUM.EEP Assign the Next Available Number to PO's
--
IF SEL3 = "1" AND CFPONUM > "0" THEN
SET ERR MES OFF;SET BELL OFF
SET VAR CKPONUM INT;SET VAR CKPONUM = .VCFPONUM
SET V VERR = .VDERR
SET ERR MES ON;SET BELL ON
IF VERR = 0 THEN
IF CFPONUM = .VCFPONUM THEN
UPD CONFIG SET CF_PONUM =(CF_PONUM + 1)
ELSE
SET V XMSG =(.VCFPONUM & "Out of Sequence. Use Anyway?")
DIA .XMSG ANS VLAST YES AT 10
IF ANS = "YES" AND VLAST = "[ENTER]" THEN
UPD CONFIG SET CF_PONUM =((INT(.VCFPONUM)) + 1)
ELSE
UPD CONFIG SET CF_PONUM =(CF_PONUM + 1)
ENDIF
ENDIF
ENDIF
SET VAR CFPONUM =(CTXT(CF_PONUM)) IN CONFIG
ENDIF
RETURN
>>>
Dennis
*****
At 06:18 AM 1/24/2004 -0800, you wrote:
>Maybe if you could post your code that creates the po we could give you
some
>advice.
>
>Sometimes someone else might point out something that you missed. It has
>happened to me!!
>
>Dan
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Dennis
>Fleming
>Sent: Friday, January 23, 2004 6:32 PM
>To: RBASE-L Mailing List
>Subject: [RBASE-L] - Re: Why we love this job
>
>
>Ben/Dan,
>
>I actually clear a required field on Add so you can't add twice unless you
>reenter a Vendor ID. Since the hardware guys always blame the s/w guys, I
>usually tell the user it must be a bad NIC card and the "add request" is
>looping in the faulty comm card. Hmmm. That must be it!
>
>Dennis
>*****
>
>
>At 07:06 AM 1/23/2004 -0800, you wrote:
>>Dennis,
>>
>>I'm sure you've thought of this, but the only time I've experienced
>>similar is when something (or my own frail logic <g>) wouldn't let a
>>routine break out of a loop.
>>
>>Or maybe your user just had his finger depressing the left mouse
>>button for a few minutes while he took a call ;-)
>>
>>Ben Petersen
>>
>>On 22 Jan 2004 at 20:19, Dennis Fleming wrote:
>>
>>> This is one I haven't seen before, and why the world of programming is
>>> always so "exciting"
>>>
>>> Mutli user Runtime 6.5++
>>> At this location about six work stations. A user adds a purchase order
>and
>>> the system "locks up". When they come back in, the application has added
>>> PO's number sequentially from 3000 to 6000. As though the user clicked
>the
>>> Add button 3000 times. The application increments a counter in the db
for
>>> the next PO number, but I am stumped on this one.
>>>
>>> Ran Reload and Autochk, and no errors.
>>>
>>> Any ideas?
>>>
>>> Dennis
>>> *****
>>> Dennis Fleming
>>> IISCO
>>> http://www.TheBestCMMS.com
>>> Phone: 570 775-7593
>>> Fax: 570 775-9797
>>>
>>
>>
>>
>Dennis Fleming
>IISCO
>http://www.TheBestCMMS.com
>Phone: 570 775-7593
>Fax: 570 775-9797
>
>
>
Dennis Fleming
IISCO
http://www.TheBestCMMS.com
Phone: 570 775-7593
Fax: 570 775-9797