Auto Entry Problem

General support questions.
Posts: 3
Joined: Tue Apr 11, 2006 1:06 pm
PostPosted: Tue Apr 11, 2006 1:11 pm
I am working on a database that I need to have a field that repeats a series of numbers. The field in the first record will be the number 1. When I create a new record I want to auto-enter 2. In the next record 3, but the next one I would like to start over at 1. I can do this with a script, but would like it to run as auto-enter when creating a new record. Is this possible? Can someone show me the required calculation?
Thank You,
Brian
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Apr 11, 2006 1:27 pm
Assuming you have another field that is an auto incrementing serial number called "serial", you could have an auto enter calc like this for your 123 field:

Choose ( Mod ( Serial ; 3 ) ; 3 ; 1 ; 2 )
John Sindelar
SeedCode
Posts: 3
Joined: Tue Apr 11, 2006 1:06 pm
PostPosted: Tue Apr 11, 2006 1:33 pm
Thanks John.
I think this will work. I can create the Serial number field that will count 1,2,3,4 etc and make that not visible. It appares to work for keeping my numbers to 1 2 3 1 2 3. Also thanks for the fast response.
PostPosted: Sat Apr 22, 2006 1:00 pm
Choose ( Mod ( Serial ; 3 ) ; 3 ; 1 ; 2 )


Mod ( Serial - 1 ; 3 ) + 1

returns the same result.

Return to General Support

Who is online

Users browsing this forum: No registered users and 2 guests

(855) SEEDCODE
[email protected]
Follow us: