Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have a field called full name and a field called password. I would like to be able to automatically generate a password from this field e.g. my name is John Smith so I want my password to be the first 3 letters of my first name and and the first 3 of my second name, But I want to do this without using 2 fields for my first & second name. I can use 'left words' for the first 3 letters of my first name but how can I get the 3 letters of my second name??

PS there may sometimes be only 1 name in the name field.

Posted

I guess it goes without saying that passwords derived from peoples names are not exactly secure?! Notwithstanding that, if its what you need to do - for whatever reason, it is certainly possible.

You could try:

Lower(Left(full name, 3) & Left(RightWords(full name, 1), 3))

This will give you johsmi for "John Smith" and johjoh for "John".

If you do not want it to repeat the first three characters of the first name where there is only one name in the field, you could use:

Lower(Left(full name, 3) & Case(WordCount(full name) > 1, Left(RightWords(full name, 1), 3)))

This will give you johsmi for "John Smith" and joh for "John".

This topic is 8092 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.