Comments on: Move List Collector Options https://servicenowguru.com/client-scripts-scripting/move-list-collector-options/ ServiceNow Consulting Scripting Administration Development Wed, 06 Mar 2024 22:01:00 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Mohammed https://servicenowguru.com/client-scripts-scripting/move-list-collector-options/#comment-7185 Mon, 29 Jan 2018 21:14:58 +0000 https://servicenowguru.wpengine.com/?p=1758#comment-7185 Hi Mark,

How can we achieve the same functionality in Service Portal?

Thanks,

]]>
By: Mohammed https://servicenowguru.com/client-scripts-scripting/move-list-collector-options/#comment-7184 Mon, 29 Jan 2018 21:13:45 +0000 https://servicenowguru.wpengine.com/?p=1758#comment-7184 In reply to Mila Morales.

Did anyone figure out on how to make this work in Service Portal?

Thanks in advance.

]]>
By: Sheetal https://servicenowguru.com/client-scripts-scripting/move-list-collector-options/#comment-7183 Wed, 10 Jan 2018 01:20:14 +0000 https://servicenowguru.wpengine.com/?p=1758#comment-7183 we are on Jakarta patch 6a

]]>
By: Sheetal https://servicenowguru.com/client-scripts-scripting/move-list-collector-options/#comment-7182 Wed, 10 Jan 2018 01:19:11 +0000 https://servicenowguru.wpengine.com/?p=1758#comment-7182 Hi Mark,

I am trying to copy RITM and have few list collector variables.Values are being copied but getting error” Unhandled exception in GlideAjax”.

Have tried steps mentioned in KB article ServiceNow KB: Unable to set the value of a list collector using setValue() (KB0622779)

Also used try & catch method.but still no luck.

Any suggesstion?

]]>
By: Mila Morales https://servicenowguru.com/client-scripts-scripting/move-list-collector-options/#comment-7180 Thu, 21 Sep 2017 19:20:22 +0000 https://servicenowguru.wpengine.com/?p=1758#comment-7180 In reply to Brian Lancaster.

This script will not work in Service Portal since the behavior of list collector in the default view and Service Portal is different. There are no left and right buckets in Service Portal’s list collector.

]]>
By: Brian Lancaster https://servicenowguru.com/client-scripts-scripting/move-list-collector-options/#comment-7179 Fri, 18 Aug 2017 15:28:54 +0000 https://servicenowguru.wpengine.com/?p=1758#comment-7179 Has this script been updated to work with the Service Portal?

]]>
By: Sherard Pulmano https://servicenowguru.com/client-scripts-scripting/move-list-collector-options/#comment-7178 Mon, 20 Mar 2017 13:22:55 +0000 https://servicenowguru.wpengine.com/?p=1758#comment-7178 does this work any different if it was in a scoped app? I have this in a scoped app and the AJAX script is not be called at all.

]]>
By: Siaka Massaquoi https://servicenowguru.com/client-scripts-scripting/move-list-collector-options/#comment-7177 Tue, 09 Aug 2016 14:00:35 +0000 https://servicenowguru.wpengine.com/?p=1758#comment-7177 In reply to Siaka Massaquoi.

Figured it out. I just added a 2 sec timeout to give the page time to load.

]]>
By: Siaka Massaquoi https://servicenowguru.com/client-scripts-scripting/move-list-collector-options/#comment-7176 Wed, 03 Aug 2016 16:18:12 +0000 https://servicenowguru.wpengine.com/?p=1758#comment-7176 I’ve been running into an issue while running this code. For some reason, the function is running too fast and instead of pulling over everything from the avaiable column, its grabbing the ‘Loading’ text that appears while the list collector is loading. Do you know a way to have this function wait till the list collector is fully loaded?

]]>
By: Matt https://servicenowguru.com/client-scripts-scripting/move-list-collector-options/#comment-7175 Tue, 24 May 2016 10:42:40 +0000 https://servicenowguru.wpengine.com/?p=1758#comment-7175 I couldn’t get it to work by passing the IDs, certainly not in Geneva. So I had to do things a round about way. This is what I used if I know the sys_id of the left bucket value and wanted to move to the right bucket. I haven’t tested this extensively yet, but I’ve add the option to look up a missing value, add it and then move it across if needed. parseResponse being the callback from glide ajax.

function parseResponse(response) {
	var answer = response.responseXML.documentElement.getAttribute("answer");
	var ans_arr = answer.split(",");
	for(var i = 0; i < ans_arr.length; i++){

		if(jQuery('#services_select_0 option[value="'+ans_arr[i]+'"]')){
			jQuery('#services_select_0 option[value="'+ans_arr[i]+'"]').attr("selected", "selected");	
		}
		else{
			//Add missing option then move it across.
			var gBS = new GlideRecord("cmdb_ci_service");
			if(gBS.get(ans_arr[i])){
	    		jQuery('#services_select_0').append(jQuery("", {
	        		value: ans_arr[i],
	        		text: gBS.name,
	        		selected: "selected"
	    		}));
    		}
		}
		
	}
	moveOptionAndSort(gel('services_select_0'),gel('services_select_1'), '--None--', [], '--None--');
]]>