Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to hide label of multi row variable set

Yi Ming Song
Tera Contributor

Is there a way to hide the label of the MRVS?

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@Yi Ming Song 

try this and it might work in service catalog view but not in portal

function onLoad() {
    g_form.setLabelOf('<internal name of MRVS>', '')
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

rambo1
Tera Guru

@Yi Ming Song try using below script :

function onLoad() {
try {
var fieldName = 'multi_row_variable_set'; // Replace with your MRVS field name
var element = g_form.getGlideUIElement(fieldName);
if (element && element.getLabelElement) {
element.getLabelElement().style.display = 'none';
}
} catch (e) {
console.error('Error in hiding MRVS label: ' + e);
}
}

 

Also  try using below code in onload client script :

g_form.setLabelOf('mrvs name','');
 
If these doesnt work , I believe this is one more limitation with MVRS

Omkar Mone
Mega Sage

Hello, 

 

I don't think this is possible OOB. you would need DOM manipulations here.

Ankur Bawiskar
Tera Patron
Tera Patron

@Yi Ming Song 

I tried the above script but it didn't work

I don't think there is a direct way for this.

you will have to use DOM manipulation here which I won't recommend.

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