- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2024 04:16 PM - edited 02-03-2024 04:16 PM
Example: In a multilpe line text field a user enters text; simultanously the other field is updated.
This needs to happen in real time as opposed to waiting for the user to click outside of the field with the multi line text.
Can this be achieved in ServiceNow?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2024 05:55 PM
You can use this one, but it will only work in Platform side and not Portal. In order to achieve this in portal, I think need to develop a widget with html textarea & keyup/keydown event.
function onLoad() {
//Type appropriate comment here, and begin script below
var control = g_form.getControl('comments');
control.onkeyup = copytext;
}
function copytext() {
g_form.setValue("comments_1", g_form.getValue("comments"));
}
Thanks,
Narsing

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2024 05:55 PM
You can use this one, but it will only work in Platform side and not Portal. In order to achieve this in portal, I think need to develop a widget with html textarea & keyup/keydown event.
function onLoad() {
//Type appropriate comment here, and begin script below
var control = g_form.getControl('comments');
control.onkeyup = copytext;
}
function copytext() {
g_form.setValue("comments_1", g_form.getValue("comments"));
}
Thanks,
Narsing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2024 06:08 PM - edited 02-03-2024 06:08 PM
Works great!
Thanks for the help, I look fowrward to trying to make this work in portal with a widget as mentioned.