Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8882 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Tell me I'm not dumb. I have set up an Appointment # field as an auto-enter serial number to increase by 1. Everything was going fine for the first 600 appointments. I thought I was pretty cool. Then, it happened. One day, the next Appointment number jumped 400 to 1,100! What the heck? It stayed ok for a few weeks going up from 1,100 one at a time. Then, it went down to 758 and I started entering appointments on top of other existing appointments and everything got screwed up. So, I went into the appointment field and set the number to start at 2,000. All fine for a few weeks and then it went down to 1,438 and I screwed up the data again.

Today, I caught it happening right after I installed a new version and imported the data into the new version. Come to think of it, this could be where all my trouble is coming from. I do design on my laptop at home and bring in a disk to the desktop at work. Then, I put my newest design on the desktop every once in awhile and import the exisiting data into it. So, the question is this. Do I have to check the appointment number that the field is set at every time I import into a new design and manually set it properly? Am I importing wrong? Am I an imbecile? If so, why is that? And even more troubling, what do I do about this?

Barry - would appreciate your words of wisdom and encouragement. Thanks.

Posted

Go to fmfiles.com and browse their tip files on serialization. There are some good tip files including one or more on mainting the serial number when you update or import files, although I can not remember the names right now.

Posted

Barry,

When you import a file that contains an auto-enter serial field, you have to be sure to do not check in the "Import options" dialog : "Perform auto-enter option while importing" , that give to the records you are importing another numeration.

zz laugh.gif

[This message has been edited by ZuperZZ (edited July 14, 2000).]

Posted

quote:

Originally posted by Barry Nirenberg:

Tell me I'm not dumb. I have set up an Appointment # field as an auto-enter serial number to increase by 1. Everything was going fine for the first 600 appointments. I thought I was pretty cool. Then, it happened. One day, the next Appointment number jumped 400 to 1,100! What the heck? It stayed ok for a few weeks going up from 1,100 one at a time. Then, it went down to 758 and I started entering appointments on top of other existing appointments and everything got screwed up. So, I went into the appointment field and set the number to start at 2,000. All fine for a few weeks and then it went down to 1,438 and I screwed up the data again.

Today, I caught it happening right after I installed a new version and imported the data into the new version. Come to think of it, this could be where all my trouble is coming from. I do design on my laptop at home and bring in a disk to the desktop at work. Then, I put my newest design on the desktop every once in awhile and import the exisiting data into it. So, the question is this. Do I have to check the appointment number that the field is set at every time I import into a new design and manually set it properly? Am I importing wrong? Am I an imbecile? If so, why is that? And even more troubling, what do I do about this?

Barry - would appreciate your words of wisdom and encouragement. Thanks.

OK, first NEVER EVER use the auto-entered serial number as anything more than a generally sequential number. Especially NEVER use it as a RecordID field or a field that you need truely sequential numbers for. There are tfar too many ways to break FMP simple sequential serial number.

I use 20 character a pseudo-random number, formatted as a text field as my RecordID. I use an auto-enter calculation as follows: Status ( CurrrentRecordID ) & "-" & Status ( CurrrentTime ) & "-" & Status ( CurrrentDate ). I have never found a way to break this, and it is virtually impossible to duplicate an ID.

As far as a really "sequential" numbering system goes, I do the following. Setup a number field, with no auto-enter options. Setup a self relationsip SerialNumber=SerialNumber, sorted in DESCENDING order. Finally setup a script that does the following: Set Field (SerialNumber, SelfRelationship::SerialNumber + 1).

This will always result in the next highest number. Now of course this does not fill in number as they get deleted (i.e. 1, 2, 3, 5 will result in the next number being 6), but that is what most people expect anyways.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Senior Filemaker Developer

http://www.database-resources.com

mailto:[email protected]

=-=-=-=-=-=-=-=-=-=-=-=-=

  • Newbies
Posted

ZuperZZ,

I don't think I'm cool enough to come up with a cool name. That is a problem for another day. regarding your answer: I have lots of lookup stuf in this file. Don't I have to check"perform auto-enter" in order to have all the lookups work?

quote:

Originally posted by ZuperZZ:

Barry,

When you import a file that contains an auto-enter serial field, you have to be sure to do not check in the "Import options" dialog : "Perform auto-enter option while importing" , that give to the records you are importing another numeration.

zz
laugh.gif

[This message has been edited by ZuperZZ (edited July 14, 2000).]

Posted

CaptKurt,

I was curious about your suggestion:

"I use 20 character a pseudo-random number, formatted as a text field as my RecordID. I use an auto-enter calculation as follows: Status ( CurrrentRecordID ) & "-" & Status ( CurrrentTime ) & "-" & Status ( CurrrentDate ). I have never found a way to break this, and it is virtually impossible to duplicate an ID."

Do you include the Functions. TimeToText and DateToText before their respective Status Functions in your calculation. I was playing around with the calc and when I set it up as you describe the Status(CurrentTime) and Status(CurrentDate) produce some weird numbers. Also I was wondering if you also use this ID field as the link to related files like in an Invoice to Invoice Lines situation.

Thanks, geod

Posted

quote:

Originally posted by geod:

CaptKurt,

I was curious about your suggestion:

"I use 20 character a pseudo-random number, formatted as a text field as my RecordID. I use an auto-enter calculation as follows: Status ( CurrrentRecordID ) & "-" & Status ( CurrrentTime ) & "-" & Status ( CurrrentDate ). I have never found a way to break this, and it is virtually impossible to duplicate an ID."

Do you include the Functions. TimeToText and DateToText before their respective Status Functions in your calculation. I was playing around with the calc and when I set it up as you describe the Status(CurrentTime) and Status(CurrentDate) produce some weird numbers. Also I was wondering if you also use this ID field as the link to related files like in an Invoice to Invoice Lines situation.

Thanks, geod

I do not use the DateToText/TimeToText as those both result in formatted text. I prefer the simple serial numbers produced by the normal Status functions.

I absolutely use this ID field in all of my important relationships.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Senior Filemaker Developer

http://www.database-resources.com

mailto:[email protected]

=-=-=-=-=-=-=-=-=-=-=-=-=

Posted

Barry,

In your original File you have already performed the lookups, so when you import the data is already in its place (Be sure to actualize all your files).

ZZ cool.gif

This topic is 8882 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.