Regarding data references where the TYPE of Service Catalog's Multi-Row Variable Set (MRVS) is Muske
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
In the Service Catalog, we created variable A with TYPE Musked in Variables and variable B with TYPE Musked in Multi-Row Variable Set (MRVS).
★Question 1
I can't decrypt and view the masked values in MRVS out of the box.
For MRVS variable B, there is no SHOW button, so I can't view the masked content. How can I view it on the screen?
★Question 2
I can't view MRVS masked values in a server-side script.
For variable A, I was able to decrypt the masked value using getDecryptedValue() and view its contents. However, for variable B, I was able to view the encrypted string before decryption, but I couldn't view the decrypted content.How can I view the decrypted value in a server-side script?
◆Sample Code
var ritmNumber = 'RITM00028704';
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('number', ritmNumber);
ritm.query();
ritm.next()
gs.info('Number: ' + ritm.number);
gs.info(ritm.variables.u_password_1);
gs.info(ritm.variables.u_password_1.getDecryptedValue());
gs.info(ritm.variables.mrvs[0].u_password_2);
gs.info(ritm.variables.mrvs[0].u_password_2.getDecryptedValue());
Result
*** Script: Number: RITM00028704
*** Script: $$%%668988142b36ba50dbccfe76ce91bf7a1HZJ4PkNSWXwbS2Y5hkEQvA==z5bwKam5h-Pq7kEnjhLAqQ==%%$$
*** Script: hogehoge
*** Script: $$%%668988142b36ba50dbccfe76ce91bf7a1H6JZvfAmL6CzLMobX4Irpw==m10fLbjlRsQaOLi_oj1e-w==%%$$
*** Script: undefined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
★Question 1
-> the Show button won't show on the MRVS list after row is added, I believe it would be shown when you add/edit the row. This is by OOTB design
★Question 2
-> use this script to grab the decrypted value, when MRVS is stored it's stored in other table and stored as string and hence no decrypt function required, it's stored as plain text
-> I could see although it's masked it's stored as plain text in "sc_multi_row_question_answer"
gs.info(ritm.variables.mrvs[0].u_password_2.toString());
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
