Applies on a Catalog Item view Applies on Requested Items Applies on Catalog Tasks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2025 08:56 PM
Hi ,i have created client script and some variables but its not work in catalog task view kindly suggest and i have selected global checkbox true for all the variables and script as well.
on change code

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 09:38 AM
Is this a Catalog Client Script? If so, you should have some checkboxes like these that will determine when it's used:
Also, I see you are setting visibility of fields within the client script. The best practice is to use UI Policies for that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 09:53 AM
Hi @rajeshraji1
try this out
function onChange(control, oldValue, newValue, isLoading) {
if (newValue == '') {
g_form.setDisplay('box1', false);
g_form.setDisplay('box1_add', false);
g_form.setDisplay('box2', false);
g_form.setDisplay('box2_add', false);
g_form.setDisplay('box3', false);
g_form.setDisplay('box3_add', false);
g_form.setDisplay('box4', false);
g_form.setDisplay('box4_add', false);
return;
}
if (newValue == '0') {
g_form.setDisplay('box1', false);
g_form.setDisplay('box1_add', false);
g_form.setDisplay('box2', false);
g_form.setDisplay('box2_add', false);
g_form.setDisplay('box3', false);
g_form.setDisplay('box3_add', false);
g_form.setDisplay('box4', false);
g_form.setDisplay('box4_add', false);
}
var a = g_form.getValue('select');
if (a == '1') {
g_form.setDisplay('box1', true);
g_form.setDisplay('box1_add', true);
g_form.setDisplay('box2', false);
g_form.setDisplay('box2_add', false);
g_form.setDisplay('box3', false);
g_form.setDisplay('box3_add', false);
g_form.setDisplay('box4', false);
g_form.setDisplay('box4_add', false);
} else {
g_form.clearValue('box1');
g_form.clearValue('box1_add');
}
if (a == '2') {
g_form.setDisplay('box1', true);
g_form.setDisplay('box1_add', true);
g_form.setDisplay('box2', true);
g_form.setDisplay('box2_add', true);
g_form.setDisplay('box3', false);
g_form.setDisplay('box3_add', false);
g_form.setDisplay('box4', false);
g_form.setDisplay('box4_add', false);
} else {
g_form.clearValue('box1');
g_form.clearValue('box1_add');
g_form.clearValue('box2');
g_form.clearValue('box2_add');
}
if (a == '3') {
g_form.setDisplay('box1', true);
g_form.setDisplay('box1_add', true);
g_form.setDisplay('box2', true);
g_form.setDisplay('box2_add', true);
g_form.setDisplay('box3', true);
g_form.setDisplay('box3_add', true);
g_form.setDisplay('box4', false);
g_form.setDisplay('box4_add', false);
} else {
g_form.clearValue('box1');
g_form.clearValue('box1_add');
g_form.clearValue('box2');
g_form.clearValue('box2_add');
g_form.clearValue('box3');
g_form.clearValue('box3_add');
}
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 11:24 AM
Hi,
can you suggest any simplest way to archive this scenario with mandatory option ?