'onChange' catalog client script is not working as expectedIssue There is an onChange() catalog client script defined on the catalog item which is used to show or hide a variable [var_b] based on the value selected for another 'Yes/No' variable [var_a]. When the value selected for var_a is 'No', then it should display var_b. When the value selected for var_a is 'Yes', then it should hide var_b. This is working fine when first time the form loads if the value selected for var_a is 'No', then var_b is displayed correctly as expected. But when the user selects a value 'Yes' [which hides var_b] and then changes it back to 'No' then var_b should be displayed but that does not happen.CauseThe order of code executed within the onChange() catalog client script is causing the issue. When var_a is set to 'yes', it is hiding var_b variable using => g_form.setVisible('var_b', false);When var_a is set to 'no', then the client script is doing the following in this order:g_form.setMandatory('var_b', true); // at this point 'var_b' is not displayed on the form so setting it to mandatory isn't work, leading to rest of the script fail as wellg_form.setVisible('var_b', true);When the order of above lines of code is changed, then it is working as expected.Resolution- Go to the onChange() catalog client script defined on the item- Swap the order of above mentioned lines of code, i.e change it tog_form.setVisible('var_b', true); // first display 'var_b' variable and then make it mandatoryg_form.setMandatory('var_b', true);