Macth two Password (2 Way Encrypted) field in Flow Designer

AMY59
Tera Contributor

Hi,all.

Please let me know because I received the following request but do not know how to implement it;

They want to verify whether the Password (2 Way Encrypted) of the A table and the password of the B table match.

They want to use "Flow Designer" when checking if they match.

 

Currently, I am in the process of verifying whether it can be implemented in the Flow Designer,

however I am in a situation where I can not select the password field by condition..

Like this;

find_real_file.png

I would like to set condition that Password2 = Password1.

How do I implement the above or how do I create a flow that checks for two passwords to match?

Best Regards,

Amy

 

1 ACCEPTED SOLUTION

Did some testing on this out of curiosity, and sadly, no, that way of temporarily storing the value in a Flow variable doesn't work either.

You can do the comparison, that part works fine, but the comparison gives no indication if the values are the same.
In my testing I created two records and manually set the password data to the same, and still the comparison fails, it does not indicate that the data is the same.

View solution in original post

3 REPLIES 3

OlaN
Giga Sage
Giga Sage

Hi,

You could try to first store the passwords in two different Flow variables, and then compare the Flow variables to see if they match.

Did some testing on this out of curiosity, and sadly, no, that way of temporarily storing the value in a Flow variable doesn't work either.

You can do the comparison, that part works fine, but the comparison gives no indication if the values are the same.
In my testing I created two records and manually set the password data to the same, and still the comparison fails, it does not indicate that the data is the same.

kevan_smith
Mega Expert

Hi Amy.  Have you tried creating a script action to compare the decrypted passwords?  I haven't tested this, but a sample script below.   

Inputs:  Password1 and Password2 (password2 data pills)  

Output:  passwordsMatch (boolean)

(function execute(inputs, outputs) {
    var encr = new GlideEncrypter();
    outputs.passwordsMatch = (encr.decrypt(inputs.password1) == encr.decrypt(inputs.password2));
})(inputs, outputs);