Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5

compare passwords before proceeding

I'm sure this isn't too hard, but I haven't figure it out yet. I have a panel that prompts the user for a user and password + password verification. I need to compare PASSWORD1 and PASSWORD2 to make sure they are identical. Is there a way to associate an "action" with the next button?
My second guess: add an "action" panel after the credential collection that compares the two fields. If they are not equal, have it go back to the previous screen (which I don't know how to do).

A similar problem: I will eventually need to test out the credentials. I'm asking for pre-existing database credentials. I will write a script/utility that connects. If successful, return 0. If it fails, return -1.

If the return code is 0, go to the next screen. If the return code is -1, display an error and go back to the credentials screen.
Labels (1)
0 Kudos
(2) Replies
Level 7

For the first part, I have an action (DisplayMessageDialog) that tells the user that the passwords do not match. That action only displays if $PASSWORD1$ not equals $PASSWORD2$. And in the message dialog, I do not let the user continue. It goes back so they can enter correct values.
Otherwise, you have to write a custom panel and put the code in the okToContinue() method.

For the second part, you may be able to do the same thing, if you can validate right after the credentials are entered. Otherwise you may have to use Jump labels and actions.
0 Kudos
Level 5

Thanks. The first part works great. I think the second part will work. I haven't finished my connect utility yet so can't test it.
0 Kudos