The CreatorCon Call for Content is officially open! Get started here.

Decrypting a masked variable in Flow Designer

Travis Michigan
Mega Sage

I am having trouble with this... I've seen a few responses for other releases but I'm unable to get any of them to work so far, hoping someone here can help me get back on track with this.

 

I have a form I just made that has a masked variable so that users can enter a PIN.  The action I'm having problem with is having the flow get the variable data to feed into the Action to update their PIN.  When I look at the outbound requests its sending data still encrypted, not the numeric pin.  I originally thought since the masked feature was part of a standard variable option in SN there would be a way to easily get this data in flow designer... but I was disappointed to find out it takes scripting.  I saw a few ways to do it... but they state they are for different releases.

 

Can anyone give me an example of how to get a variable to decrypt in the Washington DC release?

1 REPLY 1

Community Alums
Not applicable

Hi @Travis Michigan ,

Pass the requested item to a script to access variable and then unmask it with the getDecryptedValue method.

For example if "requested_item" is an input to the subflow and "masked_text" is the name of a catalog variable then this inline script will work:

var masked = fd_data.subflow_inputs.requested_item.variables.masked_text;
return masked.getDecryptedValue();