
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2019 09:04 AM
All,
This should be easy, shouldn't it? Using UI Policies, when a call comes into ServiceDesk, they can select a call type. For one particular call type (X), they then select a sub-type which is a mandatory selection. If that sub-type selection is 'Y' then a new true/false field called Terms and Conditions (u_tc) will appear. We want u_tc field to be mandatory also, but when I create a new policy which is applied when Type = X and Sub-Type = Y, with the UI action set as u_tc mandatory = true, visible = true, the user can still complete the ticket without checking u_tc.
I have even tried an On Load client script (removing the mandatory = true portion above so that the field still appears):
function onLoad() {
//Type appropriate comment here, and begin script below
if(g_form.getValue('y') == value)
g_form.setMandatory('u_tc', true);
}
What am I doing wrong here?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2019 03:00 AM
You can't make True/False field mandatory using UI policy
You have to either write an onSubmit client script or change to field choice type with Yes/No values
Below links might be helpful
https://community.servicenow.com/community?id=community_question&sys_id=0fbec761dbdcdbc01dcaf3231f961950
https://community.servicenow.com/community?id=community_question&sys_id=1e83ce61dbe85bc00e3dfb651f9619d9

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2019 02:36 AM
Thanks GGG. This is how I have it currently and still the field is not mandatory. I am sure its to do with it being a true/false field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2019 03:00 AM
You can't make True/False field mandatory using UI policy
You have to either write an onSubmit client script or change to field choice type with Yes/No values
Below links might be helpful
https://community.servicenow.com/community?id=community_question&sys_id=0fbec761dbdcdbc01dcaf3231f961950
https://community.servicenow.com/community?id=community_question&sys_id=1e83ce61dbe85bc00e3dfb651f9619d9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2019 04:07 AM
correct. if the field is false it HAS a value: FALSE.
you CANT make a true false field mandatory.
change it to a drop down with Yes / No as the selections.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2019 06:35 AM
Thanks everyone, I have written an on submit client script that alerts the user if the yes/no field is not checked