Set Next Serial Value Script Step with Upgrade

  • Follow


Hi,

I have a parent key text field that contains auto entered serial numbers
along the basis of SOLC001, SOLC002 etc. I am trying to setup an upgrade
routine that will allow me to import records from an old version into a new
version. I was hoping to import all records from the old file into the new
file, sort by the key field then use the Set Next Serial Value Script Step
to set the next auto-entered number. However the problem is when I sort by
the key field it puts them in this order:


SOLC099
SOLC100
SOLC1000
SOLC1001

which will obvoiusly give me the wrong results when using the Set Next
Serial Value Script Step. Any ideas how to get around this problem?

Thanks,
Andrew


0
Reply splash562 (3) 5/26/2004 5:44:34 AM

All you really need to know is the last imported serial number, then, in 
"field definitions" hand set the next serial number to the correct 
value. Everything should work as expected from there.

It should be easy enough to find the last serial number, sort by 
Creation Date and or time in descending order.

Michael Myett

Andrew wrote:
> Hi,
> 
> I have a parent key text field that contains auto entered serial numbers
> along the basis of SOLC001, SOLC002 etc. I am trying to setup an upgrade
> routine that will allow me to import records from an old version into a new
> version. I was hoping to import all records from the old file into the new
> file, sort by the key field then use the Set Next Serial Value Script Step
> to set the next auto-entered number. However the problem is when I sort by
> the key field it puts them in this order:
> 
> 
> SOLC099
> SOLC100
> SOLC1000
> SOLC1001
> 
> which will obvoiusly give me the wrong results when using the Set Next
> Serial Value Script Step. Any ideas how to get around this problem?
> 
> Thanks,
> Andrew
> 
> 
0
Reply Michael 5/26/2004 6:11:51 AM


Apologies. I realized that I had misunderstood an important part of your 
question. I guess I would try an ascending sort by creation date and 
time, then, as you suggested, set next serial value by script.

Michael Myett

Michael Myett wrote:

> All you really need to know is the last imported serial number, then, in 
> "field definitions" hand set the next serial number to the correct 
> value. Everything should work as expected from there.
> 
> It should be easy enough to find the last serial number, sort by 
> Creation Date and or time in descending order.
> 
> Michael Myett
> 
> Andrew wrote:
> 
>> Hi,
>>
>> I have a parent key text field that contains auto entered serial numbers
>> along the basis of SOLC001, SOLC002 etc. I am trying to setup an upgrade
>> routine that will allow me to import records from an old version into 
>> a new
>> version. I was hoping to import all records from the old file into the 
>> new
>> file, sort by the key field then use the Set Next Serial Value Script 
>> Step
>> to set the next auto-entered number. However the problem is when I 
>> sort by
>> the key field it puts them in this order:
>>
>>
>> SOLC099
>> SOLC100
>> SOLC1000
>> SOLC1001
>>
>> which will obvoiusly give me the wrong results when using the Set Next
>> Serial Value Script Step. Any ideas how to get around this problem?
>>
>> Thanks,
>> Andrew
>>
>>
0
Reply Michael 5/26/2004 6:22:10 AM

2 Replies
304 Views

(page loaded in 0.054 seconds)

Similiar Articles:













7/25/2012 5:58:42 AM


Reply: