Boolean field to show Yes/No instead of default global True/False
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2020 04:13 PM
Hi smart people,
Hope everyone is safe out there!
Here is the challenge, we have a boolean field (currently a checkbox), which is not mandatory. When is checked, it presents 2 additional fields, one of them mandatory, Project Number.
The management requested to either have the checkbox mandatory or to unhide Project Number (which they later decided not to do to avoid confusion with other teams).
So, in order to make this field mandatory, it cannot be a check box anymore, which will force everyone to check (flag it as True).
I'm trying this, added an option "Dropdown with == none ==", but the options are True or False, which I'm sure the management will ask if it can be Yes or No.
I've added the choices as Yes or No, but the form insist in use the global true/false.
Would be possible to change the label of those values to Yes / No OR to use the choices I've created for this field?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2020 04:59 PM
It is possible to display fields "Project Number" and "Affected User" when "Is this project related task?" is checked and also to make "Project Number" mandatory only when "Is this a project related task?" is checked.
Inactivate UI Policy and create a following Catalog Client Scripts.
function onChange(control, oldValue, newValue, isLoading) {
if (newValue == '') {
return;
}
g_form.setMandatory('project_number', newValue);
g_form.setVisible('project_number', newValue);
g_form.setVisible('affected_user', newValue);
}
Sample output

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2020 04:01 PM
I think there is a misunderstanding that mandatory field that is hidden is mandatory. This is not. Mandatory field that is not displayed will become unmandatory so the form can be submitted without entering a value in the field.
In the UI policy, set condition on "Is this a Project Related Task" to check if "not true" and check "Reverse if false". Then instead of making file Project Number mandatory, specify it to make Mandatory = False and Visible = False.
These settings will make field Project Number a mandatory field only when field "Is this a project related task" is checked while still allowing users to submit the form when "Is this a project related task" is unchecked.
Variables
UI Policy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2020 04:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2021 05:00 PM
Hi Hitoshi,
Thanks for all your inputs, I don't see other options than a True/False.
This is a customized table child of task table.
They want to see yes or no and the only option for a True/False type field other than a checkbox is the dropdown with True/False and None (when selected dropdown with none).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 06:13 AM
For anyone looking for a solution:
1. In the dictonary record change the Choice to dropdown with none and add these Choice options:
Then you need an on Load client script like this:
And thats all.