- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2015 02:18 AM
Dear Friends,
I have a Catalog Item. There i have one check box type variable(Let us say abc) and two date type variables(let us say mno and pqr). I want if abc variable is checked then mno and pqr variables should be visible otherwise these(mno and pqr) should remain invisible. Can you please tell how can I achieve that?
Thank you
Ramandeep
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2015 03:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2015 02:21 AM
Catalog UI Policy is preferred, but you may have to use a Catalog Client Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2015 02:51 AM
Hi Ramandeep,
1.)make a UI policy. in condition field give condtion like if field ABC is false than hide those two fields using ui policy actions.
2.)now make a catalog on change(abc field) client script.write code like below.
if(g_form.getValue('abc') == 'true'){
g_form.setDisplay('pqr',true);
g_form.setDisplay('mno',true);
}
see if this helps.
Thanks,
Rushit Patel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2015 03:06 AM
Hi Rushil,
I have created below client script. Everything is going fine except one thing. When form is loaded then it displays mno and pqr. Now if I check and then uncheck abc then it hides these two fields. If I check abc again then it again shows mno and pqr. I want these 2 fields hide even when I open catalog item. Is creating Catalog UI Policy is the only option or I can do something in client script itself?
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == 'true') {
g_form.setDisplay('mno', true);
g_form.setDisplay('pqr', true);
return;
}
else{
g_form.setDisplay('mno', false);
g_form.setDisplay('pqr', false);
}
//Type appropriate comment here, and begin script below
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2015 03:08 AM
HI Ramandeep,
Make sure that the OnLoad is checked in the UI policy you have created.
Please let me know if you have any questions.