Reverse script is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 09:57 PM
Hi All,
I have create one script in catalog client script basis on category and subcategory some variable should display on service portal.it is working fine but revers script is not working please let me know the solution. I have right down my script below.
Thanks & Regards
KP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 10:48 PM
Hi @keval3 ,
Do you mean "Reverse if false" script?
Can you please share what is desired output and what are you getting now?
Thanks and Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 12:50 AM
Hi Rahul,
My script is not working at the Reverse point Like when I choose Category and subcategory as per my requirement the variable is populating fine, but after that when I choose deferent category and sub category still those variable are visible at that time variable should be hide.
Thanks & Regards
KP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 12:52 AM
Hi Rahul,
My script is not working at the Reverse point Like when I choose Category and subcategory as per my requirement the variable is populating fine, but after that when I choose deferent category and sub category still those variable are visible at that time variable should be hide. I have right reverse condition as well but it's not working.
Thanks & Regards
KP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 01:00 AM
Try to set mandatory to false first and then hide the field, because you can not hide a mandatory field, this should fix your problem.
g_form.setMandatory('business_unit', false);
But it is going to be easier to maintain if you switch to UI Policy.
Cheers, and have a great day!
Stefan