before adding additional comments, time worked should be mandatory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 02:14 AM
Hi,
There is a requirement from one of the client that, on incident form when we add additional comments or work notes in notes section of incident form, to track time, time worked field should be filled.
Currently when we write something in additional comments, and click the post button, comments gets added in activity.
Does anyone have got similar requirement or have any idea how we can deal with such a scenario.
Please do let me know your views.
Thanks,
Shrikant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 08:39 AM
Hi Shrikant,
Write onChange client script on additional comments field and try below script to make time worked field mandatory.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
if(newValue!=oldValue)
{
g_form.setMandatory('time_worked',true);
}
}
Please mark my answer as helpful/correct if it helps you.
Regards,
Namrata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 05:12 AM
Thanks for your reply, I have already tried writing this script, but it doesn't give any prompt or error message after we click post button.
Thanks,
Shrikant.