List collector variables not showing in RITM and TASK

Madhu27
Tera Expert

Hi, I have populated group members in list collector when user selects a particular group. when user submits the catalog form and when you open RITM, the list collector showing

--None-- . I am not sure what's happening. Could somebody help?

Here is how its showing in RITM. ( actually it has 4 members while submitting the form)

find_real_file.png

4 REPLIES 4

Ivano B
ServiceNow Employee
ServiceNow Employee

Hi Madhusundana



Couple of questions


Do you mind to provide a snap shot of the list collector as variable ?


Is there any code you are using on the item affecting the list collector ?



Cheers


R0b0


find_real_file.png


find_real_file.png


function onChange(control, oldValue, newValue, isLoading) {


  var varName = 'group_members_selected_group';       // List collector name



  if (isLoading || newValue == '') {


  resetCollectorValues(varName);


  return;


  }



*** passing group members into selectedOptionsArray ****


*** passing List collector name into collectorName ****



// This function displays all the members into right bucket of list collector


function setSysUserCollectorValues(collectorName, selectedOptionsArray) {  


      var documentFragment = document.createDocumentFragment();  


      for (var i = 0; i < selectedOptionsArray.length; i++) {  


              var gr = new GlideRecord('sys_user');  


              if (gr.get(selectedOptionsArray[i])) {  


                      var option = document.createElement("option");  


                      option.text = gr.name.toString();  


  option.value = selectedOptionsArray[i];  


        documentFragment.appendChild(option);  


              }  


      }  


      var rightBucket = document.getElementById(collectorName + '_select_1');  


      rightBucket.options.length = 0;  


      rightBucket.appendChild(documentFragment);  


     


}  



function resetCollectorValues(collectorName) {  


//       var leftBucket = document.getElementById(collectorName + '_select_0');  


//       leftBucket.options.length = 0;  


      var rightBucket = document.getElementById(collectorName + '_select_1');  


      rightBucket.options.length = 0;  


}  


Ivano B
ServiceNow Employee
ServiceNow Employee

Hi Madhusundana



I would suggest to deactivate the client script and check if you can still see the values in case you submit.


Could you please try and let me know. Maybe the issue is in the code.


This can be a good starting point to understand the case of your side effect.



Cheers


R0bo


jmiskey
Kilo Sage

I am having similar issues with my List Collector on the RITM and Task when applying a Catalog Client Script.  Did you ever get a resolution to this, or is this a known bug?  Any ideas for a workaround?