i have a requirement for CMDB form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 08:51 AM
Hi all ,
I have a requirement in cmdb form , we have fields inn CMDB computer form
based on the install status
when install status is installed ,issued date is mandatory and clear the returned date
when the install status is pending repair or in stock issued date is empty and Return date will be mandatory
How to achieve thsi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 09:09 AM - edited 07-26-2023 09:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 09:31 AM
I THINK NEED CLIENT SCRIPT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 09:57 AM
Please find the solution
If its correct please mark the answer as correct
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(g_form.getValue('u_install') == 'installed'){
g_form.setMandatory('u_issue_date',true);
g_form.clearValue('u_return_date',true);
g_form.setMandatory('u_return_date',false);
}
if(g_form.getValue('u_install') == 'pending repair'){
g_form.setMandatory('u_issue_date',false);
g_form.setMandatory('u_return_date',true);
g_form.clearValue('u_issue_date',true);
}
//Type appropriate comment here, and begin script below
}
Thanks in Advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 10:35 AM
Not working