- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 01:17 PM
Hi all,
I have a requirement to make Change Number field on problem record visible and mandatory when Root cause code= anything and root cause subcode is Result of change and result of change subcode is not None.
Change Number field should be non mandatory when Root cause code= pqr.
I have written below UI policy script, but when evaluated false change number is not getting hidden.
Condition: Root cause code= anything and root cause subcode is Result of change and result of change subcode is not None.
Execute if true:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 02:40 PM
Hi @Rutuja K ,
You need to make it non-mandatory first and then set the visibility, please change the execute if false script as:
function onCondition() {
alert('Evaluated False');
g_form.setMandatory('rfc', false);
g_form.setVisible('rfc', false);
}
If my answer has helped with your question, please mark it as correct ans helpful
Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 02:40 PM
Hi @Rutuja K ,
You need to make it non-mandatory first and then set the visibility, please change the execute if false script as:
function onCondition() {
alert('Evaluated False');
g_form.setMandatory('rfc', false);
g_form.setVisible('rfc', false);
}
If my answer has helped with your question, please mark it as correct ans helpful
Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 03:07 PM - edited 05-10-2023 03:28 PM
Hi Karan,
The solution helped.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 02:41 PM
hi,
your statement "...root cause subcode is Result of change and result of change subcode is not None" implies there are two other custom fields defined on the problem table. 'u_root_cause_subcode' and 'u_result_of_change_subcode'?You can test the conditions by going to a list view of problem records, and then add a filter based on your fields