softhead Posted July 18, 2000 Posted July 18, 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
Louisa Posted July 21, 2000 Posted July 21, 2000 Hi, This is going to need a script. I suggest a procedure something like this. User enters their first name and last name. These are then combined in a calculation field (Name) to be FirstLast. Then a search of the UserName field is searched. This will return all the UserNames which contain this combination. If there are no users with that name then the new UserName is Name, else it is Name and a number. The script would look something like this: Copy [Name] Enter Find Mode [] Paste [userName] Perform Find [] If (Status (CurrentFoundCount) = 0) Set [userName = Name] Else Set [userName = Name & (Status(CurrentFoundCount) +1)] End If Good luck!
softhead Posted July 25, 2000 Author Posted July 25, 2000 Thank you SO much for your help! I used a slightly modified version of the script you provided and it now works great! Thanks Anita
Recommended Posts
This topic is 8887 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