List Collector variable with mandatory UI Policy on a Catalog item shows "on loading" on submitted sc_req_item records, and a console error displays "Cannot read property of null".
Steps to Reproduce
Go to the sc_req_item record, right-click in the header, and choose Configure Form Layout.
Add the variable editor formatter on the form if it is not already present.
For more information, see the product documentation topic Service Catalog variable editor.
Create a new catalog item named "test collector".
For more information, see the product documentation topic Create or edit a catalog item.
Create a Yes/No variable: var1.
Create a list collector variable: "list Collector test" and use any reference table for the list, for example, sys_user table.
Create a catalog UI policy with the following values:
- Conditions If yes/no var1 = NO
- Check the checkbox on "Applies on a Catalog Item view" and "Applies on Requested Items"
For more information, see the product documentation topic Create a UI policy for catalog items.
Create a catalog UI policy action for the list collector variable named "list Collector test" with the following values:
- Set mandatory to true
- Set visible to true
Go to the newly created item "test collector", and click Try It to create a record.
Go to the created sc_req_item record.
Note the "Loading" in the left list field and console error when you inspect the element rather than the list records from the reference table displaying. Also, note the console error.
This problem has been fixed in Kingston Patch 4, where the service catalog form has been redesigned to improve performance.
As a workaround on earlier releases, create a new system property named glide.sc.use_sc_form_v2 and set its value to false. This will switch the instance to use the previous version of the service catalog form.
Related Problem: PRB1252274