2 Replies Latest reply on Feb 27, 2013 10:57 PM by Vaughan

    Reset Account Password or Change Password script advice

    user19289

      Hi there,

      I am developing a contacts management solution where the administrator can add security accounts from within the application itself.

      I am using a local field for the account name and a global field for the password.

      I am also using a random password generator to create a new password during account creation with the following script.

      Set Field [TABLE::xpassword; ""]

      Loop

      Set Field [TABLE::xpassword; TABLE::xpassword & Middle(TABLE::xCharacters: 1 + Round(Random * (Length(TABLE::xCharacters) -1); 0); 1)]

      Exit Loops if [TABLE::xLength = Length (TABLE::xpassword)]

      End Loop

      xCharacters is a global field with all alphanumeric characters

      xLength is a set field length.

       

      The random password generator works fine. The problem is my "Change password" button. I have tried to use both the Reset Account Password and the Change Password script and neither seem to work?

      First they just replace the randomly generated password in xpassword with a new randomly generated password, and they dont pass that password to the security account anyway.

      I need the Change password button to take the password already in the xpassword field which was already generated by the Random password button and replace the current account password with this.

      Which script should I use and how do I set its variables?

      Thanks in advance!