- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2016 01:37 PM
I m working on a service catalog where i set the catalog item label , using setLabelOf, but unfortunately its not working. In one of the older post, its been mentioned it will not work in Service catalog. does it hold true? If so, how could we achieve it in service catalog?
I m using Fuji , i believe patch is 11
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2016 02:58 PM
Hi Kailash,
I also thought it should work but apparently it doesnt. With the function below you should be able to change label names and also raise a Hi ticket.
/**
* Description: Code that could be applied to change the label in Service catalog item
* Parameters: field name, value to be set
* Returns: Sets the label
*/function setLabelOfInServiceCatalog(fieldName, value) {
var fieldId = g_form.resolveNameMap(fieldName);
var label = gel('label_' + fieldId);
$j(label).text(value);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2016 02:02 PM
I don't think setLabelOf is not supported on the service catalog. It is only supported on the table forms.
If it is absolutely necessary, you will have to go via DOM manipulation route.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2016 02:58 PM
Hi Kailash,
I also thought it should work but apparently it doesnt. With the function below you should be able to change label names and also raise a Hi ticket.
/**
* Description: Code that could be applied to change the label in Service catalog item
* Parameters: field name, value to be set
* Returns: Sets the label
*/function setLabelOfInServiceCatalog(fieldName, value) {
var fieldId = g_form.resolveNameMap(fieldName);
var label = gel('label_' + fieldId);
$j(label).text(value);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2016 09:43 AM
Thanks Venkat..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2022 10:38 AM
For anyone finding this in the future, be sure to set the Isolate Script field on the Client Script to false else the above code will not work.