FaeryHigh Posted July 10, 2007 Posted July 10, 2007 How can I take pieces of fields to generate an ID? Example: First: John Last: Smith Company: Every Company Street: 123 E. Main St City: Springfield State: IA Zip: 54321 ID: EC123IA (Company-Street-State)
bcooney Posted July 10, 2007 Posted July 10, 2007 You can create a calc field that concatenates the values to form an ID using text functions Left() etc...but don't use this as a key field, of course. Key fields are usually auto-enter serial number fields and must be unique to each record in the table. This is what should be used in relationships.
FaeryHigh Posted July 10, 2007 Author Posted July 10, 2007 Yes this if for relationships. Could you give me a broader example?
JesseSFR Posted July 10, 2007 Posted July 10, 2007 I think bcooney just saved you a TON of headache. You can create serial numbers in filemaker. Just create a number field. Then change it's to Auto-Enter Serial number and you are all set. You will have to of course go ahead and update your past records if you already have some in there. To do that, just put the ID on the layout and select Replace Field Contents from the Records menu. Now all you have to do is select Serial Number and make sure that Update Serial Number in Entry Options is set. You now have Id's on all your records.
T-Square Posted July 11, 2007 Posted July 11, 2007 FaerieHigh-- Jumping in here, what happens when a person moves? Do you change their ID? If so, how do you fix all the relationships? Or, what happens if later someone ELSE has the same calculated ID? You might end up with *two* people with the same ID, and then their accounts are permanently cross-linked. There are a LOT of threads in these Forums about advantages and problems with using overloaded variables as record IDs, and most of them point out the advantages of simple serial number IDs. By "overloaded", I mean using one variable to store more than one bit of information--in this case, it's an ID AND it tells you what state they're from! I am reminded of the old Saturday Night Live routine for the floor-wax/dessert-topping spoof ad, which provides a perfectly absurd example of the problems of over-extended items. David
Anuviel Posted July 11, 2007 Posted July 11, 2007 You could just use a serial number auto enter as your record id - it does not need to show on the record so there will be no problems later. Then create your custom id and have the users use that to pull the records and for ease of use.
Recommended Posts
This topic is 6405 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 accountSign in
Already have an account? Sign in here.
Sign In Now