Newbies chuanist Posted June 24, 2013 Newbies Posted June 24, 2013 I am making a very simple database to track residents and their co-signers and their payments for the apartment building that I run. Since it is possible for two or more people to have the same first and last names, I hope to create a compound key in the 'people' table that uses the first name, last name, plus a date to come up with a unique identifier that will only apply to the person in each record. Anyone that can tell me how to do this in FMP 11 is invited to coffee and breakfast and/or sushi in Berkeley, California, or....(you tell me what you want)?
Brooks Posted June 24, 2013 Posted June 24, 2013 Use an auto enter serial number. It will be unique to each record. Otherwise if you want to know how to do what you asked use an auto enter calculation first name & " " & last name & " " & Get ( CurrentDate ). Make sure to not check the do not replace because you will want it to change if you alter the spelling of a name. 1
Newbies chuanist Posted June 24, 2013 Author Newbies Posted June 24, 2013 Brooks— many thanks for thinking about this for me. I defined a new field as 'calculation' and entered the string you provided: first name & " " & last name & " " & Get ( CurrentDate ) When I go to save the field I get this message: An operator (e.g. +, -, *, …) is expected here.
jbante Posted June 24, 2013 Posted June 24, 2013 You should really take Brooks' first suggestion to use an auto-enter serial number more seriously. ID numbers don't have to tell you any information about your residents; that's what the rest of your database is for.
Brooks Posted June 24, 2013 Posted June 24, 2013 You don't want a field as a calculation. Set it as text. Select Options. On the first tab of the field options box is Auto-Enter Choose auto-Enter Calculation I used the field names you provided. You should use the field selection box in the calculation window and double click the fields you want as you may have typed something different. Use the operators from the middle of the dialog window. Again I would stress that this is BAD way to make a primary key. You really should use a auto-enter serial ID
Newbies chuanist Posted June 24, 2013 Author Newbies Posted June 24, 2013 Okay, I'll take both of you guys' word for it and use a serial #. The reason I wanted to use names was for search purposes.
Brooks Posted June 24, 2013 Posted June 24, 2013 Combining fields for better a better UI presentation is done all the time. And you can use what I've told you so far, however your original question sounded like you were asking about a primary key, and if you don't know what that is name a field id and use the serial auto-enter, and you will learn about it later. It sounds like you are on your very first relational database experience. Relational databases are not excel, ( although you can technically use a table like that. ) Filemaker has many great tutorials all over the net for learning about the relational aspect. The best advice I would give you is to join filemaker technet for $100 and you will get their very comprehensive training program for free. There are also many great books out there for under $30. This forum is where you will get lots of help understanding what you are trying to do or learning, but not for the actual training material. Good luck!
jbante Posted June 24, 2013 Posted June 24, 2013 To satisfy your search needs, Find mode and Quick Find can almost surely do what you want without needing a compound field.
Recommended Posts
This topic is 4230 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