- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2022 09:09 PM - edited 10-23-2022 09:10 PM
Hello.
How can I specify multiple conditions in "Advanced condition" of Notification?
I didn't get the correct result with the script below.
if(current.variables.req_category_1 == true || current.variables.req_category_3 == true){
answer = true;
} else {
answer = false;
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2022 10:27 PM
Hi @Yuki21 ,
Try below script and replace with your script.
if (current.variables.req_category_1 == 'true' || current.variables.req_category_3 == 'true') {
answer = true;
} else {
answer = false;
}
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2022 10:27 PM
Hi @Yuki21 ,
Try below script and replace with your script.
if (current.variables.req_category_1 == 'true' || current.variables.req_category_3 == 'true') {
answer = true;
} else {
answer = false;
}
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2022 11:22 PM
Thank you!
It was a simple mistake...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2022 11:28 PM
Variables can't be used like ordinary fields in the advanced condition. It's either you use a Business rule with an event as a trigger to call a notification or use the simple conditions of the notification.
Don't hesitate to click the Helpful button if this helps.