July 13, 200025 yr 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
July 13, 200025 yr 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] =-=-=-=-=-=-=-=-=-=-=-=-=
July 14, 200025 yr Author 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
July 16, 200025 yr 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
July 18, 200025 yr Author 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
Create an account or sign in to comment