Password data type input parameter on automate method

I want to use the password data type for input parameter on automate method.

For a string data type I can access the data like this:

var1 = $evm.inputs[‘snpw’]

For the password data type that doesn’t work. I’ve seen reference to decrypt for $evm.current.

var1 = $evm.current.decrypt(<attribute_name>)

This doesn’t seem to work for $evm.inputs? How can a reference / decrypt a password type input parameter?

@gmccullough could you remind me/us about this? It is a FAQ and I am sorry that I can’t remember it


we’re using String and Passwords fields like this:

hostname = $evm.object['hostname']
username = $evm.object['username']
password = $evm.object.decrypt('password')

this works in our environments…

1 Like

@schmandforke I’m trying to use that very syntax to access both strings and encrypted passwords, but it returns an error every time for both. I’ve tried about thirty different ways and just keep getting the same errors.

NoMethodError: undefined method gsub’ for 20000:Integer

Same for both string ($evm.object['username']) and password ($evm.object.decrypt('password')).