|
OK, Karen, or the Temp table idea also seems
promising!
Have a good trip away!
David
----- Original Message -----
Sent: Tuesday, July 15, 2003 7:08
PM
Subject: [RBASE-L] - Re: An autonumber
trigger?
David: I think that would work just
fine. But at this point I've decided to give up on triggers. It
would have to be an 'after' trigger because a row would have to be inserted
into the table first with something in the PK column, then updated
afterwards. To get the 'after' trigger ability, my client
would have to upgrade her version of RBWin. And ever since I
discovered that boo-boo with null columns in choose menus not lining
up, I don't want to do that upgrade since hopefully she'll be going to
7.0. She has TONS of menus with the possibility of null columns and
she doesn't want to pay me to search and fix all of them!
So I'll
just remove the autonumber from the table and use the NEXT function on a
lookup value to get the number to
use.
Karen
1. Column is NOT autonumbered 2. Before bringing up the
screen, set variable to a random number >= 999,999,900 3. Check for
any rows in master / detail tables with this variable. 4. If are, redo
steps 2 and 3 until unique 5. Set column on form to this variable 6.
Trigger sets column to the next number.
David
Blocker
Randy:
Yes your method would work, too, but I was hoping
for a trigger so that I wouldn't have to search for code to change every
place they can add rows to this table (and there are many
places).
>As an alternative, have
two autonumbered tables. Use a form >based on the 'temporary' one to
make your initial entry.
|