SNOW-CSA • Practice Test 2
Free SNOW-CSA practice test — 10 questions with explanations. Set 2. No signup required.
Refer to the exhibit. A catalog item has a variable 'department' (choice list with values 'IT', 'HR', 'Finance') and a variable 'cost_center' (choice list initially empty). The client script is supposed to add an option to 'cost_center' when 'department' is set to 'IT'. However, when a user selects 'IT', no new option appears. What is the most likely reason?
Refer to the exhibit.
```javascript
// Catalog Client Script - onChange on variable 'department'
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') { return; }
if (newValue == 'IT') {
g_form.addOption('cost_center', 'IT_CC', 'IT Cost Center');
} else {
g_form.clearOptions('cost_center');
}
}
```