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 change the title of variable editor

k_47
Tera Contributor

I would like to know how to change the title of variable editor.

I changed all the same names in the translation table, but it did not change.

Best Regards

2 ACCEPTED SOLUTIONS

Jaspal Singh
Mega Patron
Mega Patron

Hi,

I guess the way is via DOM maniputation. Check for solution from thread.

Alternatively, you can create a Message from System UI. Check for thread.

View solution in original post

Tai Vu
Kilo Patron
Kilo Patron

Hi @k_47 

Let's try approaches below to change the title of variable editor.

#Message

Define a record in the Message [sys_ui_message] table, then set your own title in the Message field.

Screenshot 2023-11-24 at 13.49.27.png

NOTE: Variable keyword in other places could be affected as well.

 

#Client Script (Isolate script unchecked)

Create On Load Client Script, and you can get the element to re-define the title.

 

document.getElementsByClassName("veditor_header")[0].innerHTML = "Request Details";

 

NOTE: It will have delay to change the title when the form load.

 

#Formatter

Modify the formatter Variable Editor in the Requested item table.

Name: Variable Editor

URL: https://<instance_name>/sys_ui_formatter.do?sys_id=86863af2c611229101b57dcc29ac7666

The formatter is calling this UI Macro "com_glideapp_servicecatalog_veditor". You can put this gem below into the jelly script to update the title.

<script type="text/javascript">
	document.getElementsByClassName("veditor_header")[0].innerHTML = "Request Details";
</script>

 

Cheers,

Tai Vu

View solution in original post

2 REPLIES 2

Jaspal Singh
Mega Patron
Mega Patron

Hi,

I guess the way is via DOM maniputation. Check for solution from thread.

Alternatively, you can create a Message from System UI. Check for thread.

Tai Vu
Kilo Patron
Kilo Patron

Hi @k_47 

Let's try approaches below to change the title of variable editor.

#Message

Define a record in the Message [sys_ui_message] table, then set your own title in the Message field.

Screenshot 2023-11-24 at 13.49.27.png

NOTE: Variable keyword in other places could be affected as well.

 

#Client Script (Isolate script unchecked)

Create On Load Client Script, and you can get the element to re-define the title.

 

document.getElementsByClassName("veditor_header")[0].innerHTML = "Request Details";

 

NOTE: It will have delay to change the title when the form load.

 

#Formatter

Modify the formatter Variable Editor in the Requested item table.

Name: Variable Editor

URL: https://<instance_name>/sys_ui_formatter.do?sys_id=86863af2c611229101b57dcc29ac7666

The formatter is calling this UI Macro "com_glideapp_servicecatalog_veditor". You can put this gem below into the jelly script to update the title.

<script type="text/javascript">
	document.getElementsByClassName("veditor_header")[0].innerHTML = "Request Details";
</script>

 

Cheers,

Tai Vu