Clearing and adding options to a choice field multiple times in a client script does not work as expected.

Steps to Reproduce


  1. Navigate to any Catalog item for ex. Report an Issue Catalog item
  2. Right click on New Variable, and create two new variables with following details:
    1. Search Term – Single line text
    2. Module – Select Box
  3. Configure Catalog Client Script with following details
    1. Name – Test Script for search
    2. UI Type – All
    3. Type – onChange
    4. Variable_name – search_request
    5. Script

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

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








Purpose of the script: - If there is any value in Search Term then module should get populated with Options. If search term is empty, then Module options should be empty.


Actions taken: - Populate search term with ABC then make it empty and again populate it with ABC

Expected: - Module variable should get populated with Options.

Actual: -  Module variable does not get populated with Options.

Reason: - clearOptions works only once and does not work second time.


Use removeOption(fieldName, value) method instead of clearOptions method. (For more information, see GlideForm - Client.)

For ex. 


Related Problem: PRB719371

Seen In

Fuji Patch 13 Hot Fix 1

Fixed In

Helsinki Patch 10
Istanbul Patch 6

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:36:27