Description
Reproducible in K, not an issue in I and J.
Steps to Reproduce
1 - In a Kingston instance, open an sc_cat_item record, i.e. Access:
<instancename>/nav_to.do?uri=pc_software_cat_item.do?sys_id=039c516237b1300054b6a3549dbe5dfc
2 - Scroll down to 'Variables' related list and click New:
type: Select Box
question: q1
name: q1
3 - Click Save and stay at q1 Variable form
4 - Scroll down to 'Question Choices' related list and create choices as below;
text / value / order
---------------------------
one / one / 100
two / two / 200
three / three/ 300
5 - Go back to Access catalog item. Scroll down to 'Catalog Client Scripts' related list. Click New
type: onLoad
script:
function onLoad() {
g_form.addOption('q1','two','two');
}
6 - Click Submit
7 - Go to Access catalog item once more. Click Try It from the form header section.
<instancename>/nav_to.do?uri=/com.glideapp.servicecatalog_cat_item_view.do%3Fv%3D1%26sysparm_id%3D039c516237b1300054b6a3549dbe5dfc
8 - Check the q1's options. Notice the dropdown list shows the following:
-one
-three
-<blank>
-two
Workaround
Modify the Catalog Client Script to check if the option exists in the options list before trying to add it to the list.
i.e.:
Related Problem: PRB1251363