Information générale
Titre:
Appending doing replacing
Hi all,
I'm leaving tomorrow and will be gone all week, so if I don't get a reply today, I won't see it until next Saturday. (Just so you know I'm not ignoring you)
As people suggested in another thread, I have a stored procedure that gets the next key number. In the default of the key, it calls this function. The problem is that when I have that in the default, every record it appends goes on top of the last one, so I always have only one record.
Here's the procedure code:
procedure GetKey
parameter lcKeyName
local lnKeyNum
use KeyList in 0
locate for alltrim(KeyList.KeyName) = alltrim(lcKeyName)
replace KeyList.KeyNum with KeyList.KeyNum + 1
lnKeyNum = KeyList.KeyNum
select KeyList
use
return lnKeyNum
Here's what's in the default of the field clientkey: getkey('client')
What am I doing wrong?
Thanks,
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement