Re: Creating sequenced line numbers in a detail block Forms 4.0
Date: 1997/04/30
Message-ID: <33671A18.6388_at_entcf3.agw.co.bt.uk>#1/1
David Hersh wrote:
>
> I've created a master a couple of master detail blocks, and in the
> detail blocks I need to generate line numbers automatically. These line
> numbers are database fields but are only unique based on the master
> record(Sales order headers and there Lines). I can't use a sequence,
> because it would need to reset after I went down to a new master
> record. I know this is probably a easy problem to fix, but I can't seem
> to find any answers in limited documentation I have.
You could try putting an extra column in the master record, holding the highest number so far used for that master. Whenever you insert a new detail, you take that number + 1, then update the master as well.
If there is contention caused by too many hits on the master, then you can add a small table which just contains the primary key of the master and the highest value so far used.
We have used both the above methods in different places in our database.
-- The above posting represents the personal opinions of the author and is not to be taken as official (or unofficial) policy or opinions of his employer. Alex Heney, Living in the Global Village.Received on Wed Apr 30 1997 - 00:00:00 CEST