>>
> REPLACE styles.onorder WITH styles.onorder + temporder.onorder, ;
>>> styles.plabel WITH .T., ;
>>> styles.howmany WITH IIF(styles.categoryid = "8",1,temporder.onorder)
>>>inside of a SCAN loop. The problem users are seeing is that the
>>>value of temporder.onorder is not reliably getting written into
>>>styles.howmany, yet never fails with the REPLACE with styles.onorder.
>>
>>What do you mean by "not reliably getting written"? Are you getting a blank, the original value, or 1?
>
>I figured I'd blow the description :>) As an example - temporder.onorder = 6, Styles.onorder = 3, after committing the changes, styles.onorder = 9
BUT styles.howmany should be 6. 99% of the time this is true but we are seeing cases where 5 is stored in this case. Maybe 4. The .plabel and .howmany fields are used to print subsequent product labels for the PO. The problem was discovered after a run Saturday AM. 786 items were ordered - 784 lables were printed. In no case did the IIF() evaluate to .T.
Well, this probably would not make any difference, but I would slightly change this command
scan
lnOrder = tempOrder.OnOrder
replace onorder WITH onorder + m.lnOrder, ;
plabel WITH .T., ;
howmany WITH IIF(categoryid = "8",1,m.lnOrder) in Styles
endscan
If it's not broken, fix it until it is.
My Blog