dbTalk Databases Forums  

How to limit the auto enter serial

comp.databases.filemaker comp.databases.filemaker


Discuss How to limit the auto enter serial in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
smokedcow@hotmail.com
 
Posts: n/a

Default How to limit the auto enter serial - 10-21-2005 , 12:12 AM






Hey I am using filemaker 5.5, and I am using the auto enter serial
feature, how can I limit this so that when it reaches 1000 to restart
at 1 again? \


Thanks


Reply With Quote
  #2  
Old   
42
 
Posts: n/a

Default Re: How to limit the auto enter serial - 10-21-2005 , 03:14 AM






In article <1129871527.590413.290840 (AT) g49g2000cwa (DOT) googlegroups.com>,
smokedcow (AT) hotmail (DOT) com says...
Quote:
Hey I am using filemaker 5.5, and I am using the auto enter serial
feature, how can I limit this so that when it reaches 1000 to restart
at 1 again? \
You can't.

If all your 'new records' are scripted you can trap for it, script the
roll-over.

Alternatively, you can just let the serial do its thing, and define a
second field as: right(myserial,3), which will roll over to 0 when the
serial hits 1000, 2000, 3000, ... 23000... etc

If you strictly require it to cycle from 1-999 not 0-999 then you'd have
to something like:

mod(myserial,999)+1

for serial 0 : 1
for serial 1 : 2
....
for serial 995 : 996
for serial 998 : 999
for serial 999 : 1
for serial 1000 : 2
....
etc




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.