Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Flow Designer

natacha1
Tera Contributor

Hi, i'm trying to send an email that shows an encrypted masked variable through flow designer and the answer is always a big code instead of the word i want.

 

Different codes in flow designer i've tried:

/////////////////////////////////////////////////////// 1 //////////////////////////////////////////////////////////////////////////

var encr = new GlideEncrypter();
var sen = encr.decrypt(fd_data._4__get_catalog_variables.new_pass);

return "New pass: " + sen;

 

/////////////////////////////////////////////////////// 2 //////////////////////////////////////////////////////////////////////////

var sen = fd_data._4__get_catalog_variables.new_pass.getDecryptedValue();
return "New pass: " + sen;
 

/////////////////////////////////////////////////////// 3 //////////////////////////////////////////////////////////////////////////

var sen = new GlideEncrypter().decrypt(fd_data._4__get_catalog_variables.new_pass);
return "New pass: " + sen;
 
 
Hope you can help me 🙂
5 REPLIES 5

reshmapatil
Tera Guru

Hi @natacha1 ,

 

Password field/variable should be of 'Password (2 Way Encrypted)' type to use the new GlideEncrypter().

I tried similar code in scripts-background and got the proper value.

 

reshmapatil_2-1671640712150.png

 

 

reshmapatil_1-1671640688977.png

 

Regards,

Reshma

**Please mark my answer correct or helpful based on the impact**

How can i find that type of variable in catalog items?

Hi @natacha1 ,

 

No, we don't have that type of variable.

 

Check below link:

https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/administer/flow-designer/referenc...

 

Regards,

Reshma

**Please mark my answer correct or helpful based on the impact**

 

So do you know any way i can do that in a variable of a catalog item?

 

Thank you for your help anyway:)