- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 08:51 AM
I've been trying to make a true/false field mandatory on the Service Desk Call Plugin. I've tried a couple of variations of UI policies and the field shows with a grey star as if it was mandatory once but i'm unable to make the field mandatory if false and not mandatory if true
any suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 09:06 AM
Although you can "make" a True/False field (checkbox) mandatory, it always contains a true or false value so it will always be considered to be filled in regardless of the status. That's why you see the grey star - it's mandatory AND "filled in".
I always create a choice field with "Yes" and "No" options and include a blank option that fails the mandatory check.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 08:54 AM
If it always mandatory means,
make it check box true in dictionary level of the corresponding field.
if it certain condition then go for UI Policy or client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 08:57 AM
if you create an onSubmit client script you can add the condition in there:
name: mandatory true
type: onSubmit
script:
var myBoolean = g_form.getValue('variable_name');
if(!myBoolean){//this evaluates as if the checkbox is not checked
alert('This VARIABLE must be checked before saving');
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 09:06 AM
Although you can "make" a True/False field (checkbox) mandatory, it always contains a true or false value so it will always be considered to be filled in regardless of the status. That's why you see the grey star - it's mandatory AND "filled in".
I always create a choice field with "Yes" and "No" options and include a blank option that fails the mandatory check.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2017 07:05 AM
Thanks Jim, i've gone with this option