Filepro-list Digest, Vol 36, Issue 17

Tom Carey wtcarey at tx.rr.com
Mon Jan 15 23:36:56 PST 2007


Thank you for the replies to my question.

I have another question. On the same system there is an order entry record. 
That record has associated fields that repeat 32 times. Each instance of the 
associated field represents a complete item order. The relevant portion of 
the file layout is below.

Item number               S0)    fld # 21    10,*
Qty ordered               S1)    fld # 22     4,.0
Qty Shipped               S2)    fld # 23     4,.0
Qty Back ordered      S3)    fld #  24      4,.0
Description                 S4)   fld # 25     31,*
Unit price                   S5)    fld # 26     7,.2
flag                             S6)    fld # 27    2,allup
extended price.           S7)    fld # 28     8,.2
Dept number               S8)   fld # 29      7,*

The fields repeat 31 more times.

In the update mode. The data entry person can change any field but the 
extended price. They can even add new lines to the order.

Here is the problem. When the order is initially entered the Qty ordered is 
added to the product file to tell  mfg how many of each item to make. When 
the order is shipped, the record is placed in the update mode and the Qty 
shipped is added. All seems well at this point. When the order is completed 
the Qty ordered is subtracted from the product file. Any BO is reentered 
into the system as a new order. All is well.

The problem occurs when the order is modified at update time. The Qty on 
order may be changed. The item number may be changed. The price may be 
changed. Entire new line items may be added to the order.

My intent is to store the associated fields in an array at the entry into 
update mode. At the end of the update, go thru the array and compare the 
initial values to the final values so I can detect changes to Qty ordered. 
item number, new lines etc. At that point I know what action has to be taken 
to make sure that the product file is correctly handled.

At this point I don't know of an easy way to get the associated fields into 
the array upon entry into the update mode. I am using the system field @AF 
during add mode to index the array and populate it as the data is initially 
entered.  Unfortunately, the system objects if I try to manipulate  @AF.  I 
have looked at overlaying an array but don't see how I can make that work. I 
looked at overlaying an array as a column but the fields of the same type 
are not sequentially numbered.
i.e. item number is fld 21,30,39 etc.

Any ideas on how I can stuff the data into an array before the operator gets 
a shot at it would be greatly appreciated.

To make things worse , only the first 30 occurrences of the associated 
fields are contiguous in the record layout, the last two occurrences were 
tacked on to the end of the record.

Before anyone throws rocks for the way file is laid out, I didn't do it. I 
inherited this system and am cleaning up the mess, learning Filepro as I go.

I can't begin to tell you folks what it means to have someone to ask 
questions of and get guidance from. I don't feel that I am all alone without 
any resources other than the on-line manuals. Thank you for being there.

Tom Carey

Almost a Filepro programmer.


----- Original Message ----- 
From: <filepro-list-request at lists.celestial.com>
To: <filepro-list at lists.celestial.com>
Sent: Monday, January 15, 2007 2:29 AM
Subject: Filepro-list Digest, Vol 36, Issue 17


> Send Filepro-list mailing list submissions to
> filepro-list at lists.celestial.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> or, via email, send a message with subject or body 'help' to
> filepro-list-request at lists.celestial.com
>
> You can reach the person managing the list at
> filepro-list-owner at lists.celestial.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Filepro-list digest..."
>


--------------------------------------------------------------------------------


> Today's Topics:
>
>   1. Field length changes. (Tom Carey)
>   2. Re: Field length changes. (CDAY)
>


--------------------------------------------------------------------------------


> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 



More information about the Filepro-list mailing list