Regarding data references where the TYPE of Service Catalog's Multi-Row Variable Set (MRVS) is Muske

m7777
Tera Guru

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).

 

m7777_1-1771220816365.png

 

★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



 

 

 

 

 

1 REPLY 1

Ankur Bawiskar
Tera Patron

@m7777 

★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

AnkurBawiskar_0-1771223764553.pngAnkurBawiskar_1-1771223776161.png

 

★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());

AnkurBawiskar_2-1771223844155.pngAnkurBawiskar_3-1771223956435.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader