When trying to load the values into a list collector variable using a catalog client script, the list collector variable becomes empty after loading a certain number of choices (35).

Steps to Reproduce

  1. Hop to a London instance
  2. Navigate to 'sc_cat_item' table and select any item (for example Standard laptop)
  3. Create two new variables of type List collector and checkbox in the variables related list.

    i. Variable 1:
    Type: checkbox
    Question: testbox
    Name: testbox
    Submit it.
    ii. Variable 2:
    Type: List collector
    Questions: test
    Name: test
    click on 'Type Specification' : List table: Incident.
    Submit it.
  4. Navigate to the catalog item you selected in step 2 (i.e Standard Laptop) and click on the 'New' button on the 'Catalog client Scripts' related list and fill in the below details.

    Name: Set list collector
    UI type: All
    Type: Onchange
    Variable Name: testbox (name of the checkbox variable created in step 3)

    function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {

    //Type appropriate comment here, and begin script below

    var a = [];
    var gr = new GlideRecord("incident");
    gr.query(function (gr){

    g_form.setValue('test', a);


    g_form.setValue("test", "");

    Save the catalog client script.
  5. Navigate to that catalog item in service portal. (standard laptop catalog item).
  6. Select the checkbox 'testbox'

    Please note that the list collector variable 'test' is empty.

    Expected behavior: All the choices should be loaded in the List collector.

    Actual behavior: The list collector is empty.

    Please Note: If you pass in a third parameter display value the issue is resolved when the items added to the list collector is greater than 35 items.

    g_form.setValue('<variable_name>', '<sys_id_array>', '<display_name_array>');

    sys_id_array < 35 items (sys_id) doesn't have this issue


This problem has been fixed. If you are able to upgrade, review the Fixed In or Intended Fix Version fields to determine whether any versions have a planned or permanent fix.


Related Problem: PRB1327287

Seen In

SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - Security - Integration Framework - Madrid 2019 Q2
SR - Security - Support Common - Madrid 2019 Q2
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - SIR - Security Incident Response - Madrid 2019 Q2
SR - SIR - Store SecOps Setup Assistant - Madrid 2019 Q2
SR - SIR - Store Threat Core - Madrid 2019 Q2
SR - SIR - Store Trusted Security Circles Client - New York 2019 Q3
SR - VR - Configuration Compliance - New York 2019 Q3
SR - VR - Qualys - New York 2019 Q3
SR - VR - Rapid7 - London 2019 Q2 v.6.2.1
SR - VR - Vulnerability Response - New York 2019 Q3
SR - VR - Vulnerability Response PA Content - Madrid 2019 Q2

Fixed In

New York

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-07-24 22:56:00