Notifications

211 views

Overview


This article provides an example of a catalog client script that was created to illustrate changing the appearance of labels in Service Catalog. The Catalog item Vacancy Request Form has three labels: vac_details, details and reason. A catalog client script of type onLoad was created and the sys_id of these variables from Variable[item_option_new] table manipulates the appearance of the labels.

Sample script to change label appearance


The following example shows the onLoad catalog client script.

function onLoad() {
var text = $j("label[for='IO:f37690b2db1d53c0fee9f7d41d96195a']"); // f37690b2db1d53c0fee9f7d41d96195a is the sys_id of label: vac_details
text.css('font-weight', 'bold');
text.css('font-size', '125%');

var text1 = $j("label[for='IO:55ee08badbd953c0fee9f7d41d961943']"); //55ee08badbd953c0fee9f7d41d961943 is the sys_id of label: details
text1.css('font-weight', 'bold');
text1.css('font-size', '125%');
text1.css('background-color','orange'); 

var text2 = $j("label[for='IO:0fc098fadbd953c0fee9f7d41d961972']"); //0fc098fadbd953c0fee9f7d41d961972 is the sys_id of label: reason
text2.css('font-weight', 'bold');
text2.css('font-size', '125%');

}

 

 

Additional Information


For more information, see the product documentation topic Catalog client script creation.

 

 

Article Information

Last Updated:2018-08-03 00:46:37
Published:2018-07-25
Screen Shot 2018-07-20 at 11.57.22 AM.png