setMandatory in Catalog Client Script throws the console error Uncaught TypeError: Cannot read property 'querySelectorAll' on List Collector and blocks the remaining script from executing.

Steps to Reproduce


  1. Create a record producer on table User (sys_user).

  2. Create two variables:

    • A variable of type List Collector mapping to First name in the sys_user table
    • A variable of type Select Box with question choices (Yes : 1, No: 0)
  3. Create an OnChange catalog client script on the second variable.

    function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
    if(newValue == '1') {
    alert('set to true');
    else {
    alert('set to false');
  4. Go to the record producer and click Try It.

  5. Change the values in the second variable from Yes to No and vice versa.

    You see an error in the console whenever the onChange client script is run. Because of the script error, the next lines of code are not executed and the alert never comes up. For example:




Add a True/False type property named and set the value to false.

If you are able to upgrade, review the Fixed In field to determine whether any versions have a permanent fix.

Related Problem: PRB1238021

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

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