Facing Issue Regarding Work Notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2025 07:10 AM
Hi,
I am facing an issue regarding work notes , My use case is that when user enters input in the work notes, if the length of the message is less than 30 , i have to show a error message on the field itself, but this has to be real time while user is writing the message , so for this i used a OnChange client script to show the error message . The issue i am facing is that whenever on the incident form , as soon as i start to write in the work notes, the error message gets displayed and my mouse control ( basically focus ) is moved out of the work notes, to continue i again have to click in side the textarea.
But what i need is that when the error message gets displayed, the focus should not move out of the work notes textarea and the user should be able to continue writing the message.
Your guidance is greatly appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2025 01:17 AM
Hi @kushagrasah
Please share your script if possible. I've tried the below script in my PDI and it's working as expected.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var count = newValue.length;
if (parseInt(count) > 30) {
g_form.showFieldMsg("work_notes", "Error message...",'error);
}
}
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2025 10:50 AM
This script is not able to keep focus on my work notes for every user , it works for some of them only