Solved

Generating a password

  • 9 December 2019
  • 3 replies
  • 45 views

I have an application that when a form is submitted it generates a random 8 digit password. The password will be created form three fields in the form which are joined in to a single string. Them using the random number experession to generate 8 numbers that corresepond to a characters position in the string. The bit I am struggling with is the expression to get the nth number in the string. Can anybody advise on how to get the nth charchter in the string or even if there is a better way to do it .

 

Thanks  

icon

Best answer by Mike_K2 9 December 2019, 21:07

View original

3 replies

Badge +10
Hi Andy,

I'd think you could use the "Mid" expression, found under the text category in the expression builder to achieve this.

Mid( $String, 5, 5) or Mid( $String, 5, 6) would return a single character I'd think.

Regards,

Mike
Badge +7

Hello  @AndyR1 ,

 

Check this out:

 

Textbox control with a password mask:

https://community.k2.com/t5/K2-blackpearl-Articles/Textbox-control-with-a-password-mask/ta-p/76595

 

Password control:

https://community.k2.com/t5/K2-blackpearl-Articles/Password-control/ta-p/76613

 

How to auto Mask a text box?:

https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/How-to-auto-Mask-a-text-box/td-p/88643

 

Textbox control with a password mask:

https://community.k2.com/t5/K2-blackpearl-Articles/Textbox-control-with-a-password-mask/ta-p/76595

 

Textbox control for Password field with Mask:

https://k2recipes.wordpress.com/2017/05/04/textbox-control-for-password-field-with-mask/

 

PASSWORD TEXTBOXES IN SMARTFORMS:

https://johnnyk2com.wordpress.com/2016/05/23/password-textboxes-in-smartforms/

 

 

Enjoy!

Mike,

 

This great. The only thing now is the passord is generated using a mix of lower case and upper case letters. but when yiu type the autogenerated password in to the password field its not case sensitive. Is there any way to set the password field to be case sensitive.

 

Many thanks

 

Andrew 

Reply