- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 07:02 AM
Hi ,
In Incident form Show Impacted (reference field ) and Show Start Date are two columns and These two columns are part of one Table only.
When I select the Show Name in show impacted column then it need to display related Show Date in Show Start Date field.
Instead it is showing value as undefined when selecting particular show name even after it has the date.
Please provide suggestions.
Script:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 07:15 AM
@Ankur Bawiskar could you please help me on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 07:30 AM
check what came in alert?
Is that record having date in it?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 07:39 AM - edited 04-02-2025 07:40 AM
Just on the form loading (without selecting Show Impact value )only it is showing as Date is undefined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 08:41 AM
you should have script when value changes so do this and not when form loads
Ensure all field names are correct
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading) {
return;
}
if (newValue == '')
g_form.clearValue('u_show_start_date');
if (oldValue != newValue)
var userObject = g_form.getReference("u_show_impacted", doAlert);
function doAlert(userObject) {
g_form.setValue('u_show_start_date', userObject.getValue('u_start_date'));
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader