- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 08:17 PM
Hi: A list collector in a record producer displays like this:
This takes up a lot of unnecessary space. Is it possible to make it display like a watch list in the tool as such:
Thank you, Rita
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 10:06 PM
Hi Rita,
The width of the variable can be set via using DOM. For this you need to write an onLoad Catalog Client Script on the catalog Item as of below:
function onLoad() {
//Get the Variable' Element ID by using Inspect Element on the Catalog Item or by pressing F12
var el = document.getElementById('variable_IO:b437883b6fe63200f9ac52b10b3ee45e');
el.style.width= '350px';
}
You can find the Variable ID by using inspecting element. Please find below how I have got the variable's Element ID.
Once You are done with the Scripting, it would look like below:
And my bad for my last response on the 'i' icon. For variable of glide_list type, there is no 'i' icon available.
I hope this helps.Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 08:24 PM
HI Rita,
Unfortunately this is how List collector is displayed in record producer and catalog item. We cannot bring the same as we have in Form level.
http://wiki.servicenow.com/index.php?title=Variable_Types#gsc.tab=0
Refer Section 10

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 10:36 PM
Yes, You can achieve this.
Create a variable of type "Macro with Label" and select "macro_watch_list" as the macro. That will get you what you are looking for.
Also, you may run into some other UI/scripting limitations there depending on what you need to do. My preference is to use the standard list collector but adjust the size so that it isn't so huge. This SNGuru link shows how to do this and it might be a good alternative to consider.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 11:52 PM
Hi Rita,
YES you can achieve this. For this you need to have instance at least of Helsinki version. You need to add glide_list in the 'Variable Attribute' under 'Default value' tab in your 'List Collector' type variable. Please check Variable attributes .
I hope this helps.Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 12:47 AM
Rita,
Please write a OnLoad Client Script:
function onLoad(){
var varName = 'Your_List Collector_Variable_Name';
var height = '100'; //Optional
var width = '250'; //Optional
try{
//Get the left and right bucket input elements
var leftBucket = $(varName + '_select_0');
var rightBucket = $(varName + '_select_1');
//If the element exists
if(leftBucket){
//Adjust the bucket height (default is 300px)
if(height){
leftBucket.style.height = height + 'px';
rightBucket.style.height = height + 'px';
}
if(width){
//Adjust the bucket width (default is 340px)
leftBucket.style.width = width + 'px';
rightBucket.style.width = width + 'px';
//Fix Fuji/Geneva width issue
leftBucket.up('.slushbucket').style.width = width*2 + 100 + 'px';
}
//Fix the expanding item preview issue
$(varName + 'recordpreview').up('td').setAttribute('colSpan', '3');
}
}catch(e){}
}
I hope this helps.Please mark correct/helpful based on impact
Regards,
Shaik Irfan