Change the Size of a List Collector Slushbucket Variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2011 01:05 PM
I've tried the Catalog Client Script from the svc now guru website and it doesn't seem to work for me. All I changed was my variable name in the script below and the size of the list collector did not change any. Any ideas what would cause this Catalog Client Script NOT to work for me.
http://www.servicenowguru.com/scripting/client-scripts-scripting/change-size-list-collector-slushbuc...
function onLoad(){
var varName = 'YOUR_VARIABLE_NAME_HERE';
var height = '10'; //Optional
var width = '250'; //Optional
//Get the left and right bucket input elements
var leftBucket = gel(varName + '_select_0');
var rightBucket = gel(varName + '_select_1');
if(height && g_form.getControl(varName)){
//Adjust the bucket length (default is 18)
leftBucket.size = height;
rightBucket.size = height;
}
if(width && g_form.getControl(varName)){
//Adjust the bucket width (default is 340)
leftBucket.style.width = width;
rightBucket.style.width = width;
}
}
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2012 08:39 AM
For the sake of this exercise, I've commented out code we have that hides the left bucket.
I've followed the directions for adjusting the preview text fields, and have removed the long text field (short description) from the column list.
I'm using 1024x768, IE8 in compatibility mode (IE9 is not an option for us at this time).
As you can see in the screenshots, after it gets populated, the slushbucket auto-expands even though the long text field is not in the preview columns, and the cart is pushed completely off screen.
Even with the code in place that hides the left bucket, it's still not usable, because the cart is mostly off screen.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2012 09:04 AM
Ugh, that's one ugly slushbucket! I can't reproduce that, but I wonder if it's due to some other factor like CMS or the other variables on the form. Can you try to reproduce the issue in the standard frames? Can you reproduce the issue in the demo instance? Can you reproduce the issue even when the SNGuru script isn't being used? You may have to go to support on this one but it will help if you can eliminate some of the variables. I can guarantee they'll try to blame it on the SNGuru script but I don't think that's the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2012 09:42 AM
Mark,
thanks for replying to this thread... I do have a ticket open with support, but it's not going anywhere.
I'm actually not using your exact script to adjust the width.
If I deactivate the list collector variable and the script that is doing an onload filter and width control plus some other things, the form renders just fine.
Just tried it in the standard frames view and the same thing happens, but this view does give me a bottom scroll bar, so I can at least scroll to see the cart.
I'll put something out on the demo site so everyone can see this happen live.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2012 12:31 PM
OK, I've got it on the demo site... check out "IE8 Render Test" catalog item.
The slush bucket does not auto-size to the long text.
What's the difference?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2012 01:00 PM
Which demo instance? Sounds like it's a problem with your instance or ServiceNow version though, right?