Encrypting/Masking Variables in a Catalog Form (Integer field and String Field)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2015 02:18 AM
Hi All,
We have a requirement here to make two of the catalog fields, in a form, encrypted/masked. (Basically the client wants us to make the fields look like a password field where and when user types in the text or integer it comes up in "*****" format or hidden format).
So , how to do that for a variable type string (Text Box) or Integer field? Anybody can help here?
Will that appear in the same way in the RITM form and TASK form?
And what will be the process to decry-pt or unmask it?
Thanks in Advance,
Shahid
- Labels:
-
Integrations
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2015 02:35 AM
I suggest on Catalog you encrypt the value of those two fields "Password (2 way encrypted)"
and while mapping fields to RITM (It depends how you map it), you could use below
var Encrypter = new GlideEncrypter();
var variable_value1 = Encrypter.decrypt(current.variables.variable_name1);
var variable_value2 = Encrypter.decrypt(current.variables.variable_name2); \
Now you will have decrypted value of variables
hope this will help little bit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2015 02:40 AM
Hi Rahul,
Thanks for the fast reply.
Can you let me know where i can select that option of "Password (2 way encrypted)"?(Are you talking about the system property?)
And what about the scripting? In case i dont want to encrpt the info in the task or ritm level rather encrypt it through a checkbox or something?
RGDS,
Shahid

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2015 02:52 AM
Hi Shahid,
I am talking about variable type type "Masked". However if you do not wan't to encrypt it, "do not select the user encrypt".
Further to your question about decryption(you mentioned encryption), I think you can do it using UI action(A button). below link will surely help :-
Variable Types - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2015 03:02 AM
HI Rahul,
I am aware of that format called masked variable but i am not able to see that option under "type", when i am trying to select the type of that field.
I am using the Eureka version. Is it the reason the Masked option is not available? As i saw that it is available in Fuji.
RGDS,
Shahid