- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2025 05:11 AM - edited 02-04-2025 05:13 AM
Hi Team,
My Requirement:
If user select the " Is this in scope of MF2 initiative = Yes" , Send email notification to user , if user select the " Is this in scope of MF2 initiative = no " not required to send email notification.
Is there any requests associated with MF2=YES , This notification will be sent .
There are 20 notifications are there in the system so we can add this "Is this in scope of MF2 initiative? = Yes" line to
existing notifications if the users select to the MF2.
Please help me how can we achieve this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 01:49 AM
use this
var mf2initiative = current.variables.mf2initiative.getDisplayValue();
if (mf2initiative == 'Yes') {
template.print('Yes');
} else {
template.print('No');
}
})(current, template, email, email_action, event);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 06:23 AM
I didn't get what you mentioned.
want to apply notification /email script for existing notifications?
You can use email script but notification is on which table -> we don't know
what's your next requirement? please explain in detail
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 07:09 AM
want to apply notification /email script for existing notifications: YES
You can use email script but notification is on which table -> u_cloud_intake_request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 08:08 AM
then query and check the variable value
if(current.variables.variableName == 'Yes'){
template.print();
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 05:23 AM - edited 02-11-2025 05:24 AM
Thanks for your response.
I want to fetch ths variable form the Variables ( Record producer)
I have developed the code metioned below . Please correct me any change required.
//Fetches the Mf2 value from variables
var mf2initiative = current.variables.mf2initiative.getDisplayValue();
if (mf2initiative.length === 0) {
template.print('None');
} else {
template.print(mf2initiative.join(','));
}
})(current, template, email, email_action, event);
Thank you for your cooperation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 05:39 AM
use this
var mf2initiative = current.variables.mf2initiative.getDisplayValue();
if (mf2initiative.length == '') {
template.print('None');
} else {
template.print(mf2initiative.join(','));
}
})(current, template, email, email_action, event);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader