Jump to content
Server Maintenance This Week. ×

Designating user names


This topic is 8685 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This topic is 8685 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.