softhead Posted July 13, 2000 Posted July 13, 2000 I would like to create user names that simply takes the user's first and last name and put them together. My problem is, if there are duplicate names, I would like the field to automatically calculate it so that it ends up being FirstLast2, FirstLast3 etc... How would I go about doing that? Thanks, Anita
Kurt Knippel Posted July 13, 2000 Posted July 13, 2000 quote: Originally posted by softhead: I would like to create user names that simply takes the user's first and last name and put them together. My problem is, if there are duplicate names, I would like the field to automatically calculate it so that it ends up being FirstLast2, FirstLast3 etc... How would I go about doing that? Thanks, Anita You will need one field that is the "test" calculation and is simply FirstName & LastName. Setup a Self relationship Test=Test. Setup a second field, which will be your actual calculation. FirstName & LastName & NumToText ( Count (TestRelationship::TestCalc) ) The result should be the name followed by 1, 2, 3, etc. You might need to throw in some additional error trapping and cases, such as the supression of the "1", when it is the first name, and so on. ------------------ =-=-=-=-=-=-=-=-=-=-=-=-= Kurt Knippel Senior Filemaker Developer http://www.database-resources.com mailto:[email protected] =-=-=-=-=-=-=-=-=-=-=-=-=
softhead Posted July 14, 2000 Author Posted July 14, 2000 quote: Originally posted by captkurt: You will need one field that is the "test" calculation and is simply FirstName & LastName. Setup a Self relationship Test=Test. Setup a second field, which will be your actual calculation. FirstName & LastName & NumToText ( Count (TestRelationship::TestCalc) ) The result should be the name followed by 1, 2, 3, etc. You might need to throw in some additional error trapping and cases, such as the supression of the "1", when it is the first name, and so on. This was a very good idea, but unfortunately, if there were 3 people with the same name, it would change all of their user names to First Last3. Would I have to use a script? Thanks, Anita
Keith M. Davie Posted July 16, 2000 Posted July 16, 2000 The problem with identical names is the reason that many developers use a unique identifier value such as a password or serial#, or even a combination. Peace Keith M. Davie
softhead Posted July 18, 2000 Author Posted July 18, 2000 I did try using a serial number, but how would I add just the necessary serial number to identical user names? All I can do is add a number to everyone's name and that just seems to be rather inefficient as there are about 200 000 users... Thanks, Anita
Recommended Posts
This topic is 8899 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