1 Reply Latest reply on Apr 24, 2012 10:21 AM by philmodjunk

    Password required on a field



      Password required on a field


      Hi every one!

      My question today is, how can I create a script that shows a custom dialog asking for a password to be able to enter data on a field?


      Something likr: (on custom dialog) password: ******** ok - cancel

      Return: "Password error" or be able to modify a field


      Thank you!

        • 1. Re: Password required on a field

          Put an OnObjectEnter script trigger on the field. Set it to perform a script that uses Show Custom Dialog with a global field specified as an input field in the custom dialog. There's an input field option that will replace the characters entered with bullets.

          Your script might look like this:

          Show Custom Dialog ["Please enter manager approval password:"]
          IF [YourTable::gPasswordField ≠ "Open Sesame"]
              Show custom Dialog ["invalid password"]
              Go to field [//specify another field here or use go to object to put the focus on a layout object with an object name]
          End If

          It's also possible for the script to use either get ( accountName ) or get ( accountPrivilegeSetname ) to identify whether the current user should be permitted access to the field. In this case, you don't have to use show custom dialog to ask for a password.