Rename Variables formatter label

CCZMAX1
Mega Sage

Hi, I have added the catalog variable formatter to my form design but when it displays it has the title Variables.  Does anyone know if this can be changed?

 

I added a section title but the Variables label still remains.  I can see that the default UI macro is com_glideapp_questionset_default_question_editor but nothing in there seems to be setting the label as Variables.

 

Many thanks

Max

2 ACCEPTED SOLUTIONS

Mr khan
Tera Expert

Hi @CCZMAX1 

The “Variables” title shown by the Catalog Variable Formatter is system-defined and cannot be changed or removed using form design, section titles, or the default UI macro. ServiceNow hard-codes this label in the formatter rendering logic, not in the macro you mentioned. The only way to change it would be through unsupported customization (cloning and modifying the formatter/UI macro), which is not recommended.

If it is helpful, please hit the thumbs up button and accept the correct solution.. 🙂

 

Thanks & Regards,

Mr Khan

View solution in original post

Ankur Bawiskar
Tera Patron
Tera Patron

@CCZMAX1 

you can check this and see if this works, if it works then it will replace it for all the tables

can I change the label for the variable formatter name that shows up on a form? 

AnkurBawiskar_2-1767086327577.png

 

if not and you want only for 1 table then

You can use DOM manipulation but it's not good practice

onLoad client script on your table

Isolate Script = False ( to allow DOM)

AnkurBawiskar_0-1767086093642.png

function onLoad() {
	
    //Type appropriate comment here, and begin script below

    setTimeout(function() {
        document.getElementsByClassName("veditor_header")[0].innerHTML = "My Title";
    }, 3000);

}

AnkurBawiskar_1-1767086194177.png

 

Output:

AnkurBawiskar_3-1767086359377.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

View solution in original post

3 REPLIES 3

Mr khan
Tera Expert

Hi @CCZMAX1 

The “Variables” title shown by the Catalog Variable Formatter is system-defined and cannot be changed or removed using form design, section titles, or the default UI macro. ServiceNow hard-codes this label in the formatter rendering logic, not in the macro you mentioned. The only way to change it would be through unsupported customization (cloning and modifying the formatter/UI macro), which is not recommended.

If it is helpful, please hit the thumbs up button and accept the correct solution.. 🙂

 

Thanks & Regards,

Mr Khan

Thank you.

Ankur Bawiskar
Tera Patron
Tera Patron

@CCZMAX1 

you can check this and see if this works, if it works then it will replace it for all the tables

can I change the label for the variable formatter name that shows up on a form? 

AnkurBawiskar_2-1767086327577.png

 

if not and you want only for 1 table then

You can use DOM manipulation but it's not good practice

onLoad client script on your table

Isolate Script = False ( to allow DOM)

AnkurBawiskar_0-1767086093642.png

function onLoad() {
	
    //Type appropriate comment here, and begin script below

    setTimeout(function() {
        document.getElementsByClassName("veditor_header")[0].innerHTML = "My Title";
    }, 3000);

}

AnkurBawiskar_1-1767086194177.png

 

Output:

AnkurBawiskar_3-1767086359377.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