- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 12:32 AM
Hi @Ankur Bawiskar ,
No alerts are populating.
Here is the scripts
Client Script:
Script Include (client callable)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 12:58 AM
did you add gs.info() in script include and see if the function was called?
script include and client script are in same scope?
I believe I already answered your question, please debug further and enhance if any changes required
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 03:54 AM
Hi @Ankur Bawiskar ,
Thank you so much for your quick assistance and I achieved it with your initial code itself by adding date format conditions (bold and Underlined).
Here is the Script for reference
Client Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 07:51 AM - edited 04-02-2025 07:56 AM
Try below script.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var userObject= g_form.getReference("u_show_impacted", doAlert);
function doAlert(userObject) {
g_form.setValue('u_show_start_date', userObject.getValue('u_start_date')); //Make sure to use the correct field name
}
}NOTE: While setting the date value you are not picking the correct field name. Check that. Also please share the snap of your onchange client script configuration.
As per my script, you onchange client script should be configured on "Show impacted" field and UI type should be "All"
Regards ,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 08:55 AM - edited 04-02-2025 08:55 AM
Thank you @J Siva i.e., Correct and it is populating date now but format taking is in opp format when loading
Table data:
Incident reflection: