- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 02:29 PM
Hello,
We have a Catalog Item with a variable named 'Priority.' The variable contains 'Low Priority' and 'High Priority.
Need help with Advance condition if value is High Priority, then send the high email. Otherwise, send the Low Priority notification.
Here what I have, but it did not work. Thank you
if (getPriority == 'low_priority') {
answer = true;
} else {
answer = false;
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 04:30 PM
Hi @Clara Lemos ,
I was using the following code, but that did not works:
var getPriority = current.variables.select_Priority;
if (getPriority == 'low_priority') {
answer = true;
} else {
answer = false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 02:52 PM
Hi @Jessica28 ,
Is "getPriority" the name of your variable? If yes, try using current.variables.getPriority in your script instead of getPriority .
If that helps please mark my answer as correct / helpful!
And if further help is needed please let me know
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 04:30 PM
Hi @Clara Lemos ,
I was using the following code, but that did not works:
var getPriority = current.variables.select_Priority;
if (getPriority == 'low_priority') {
answer = true;
} else {
answer = false;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 04:54 PM - edited 11-07-2023 04:55 PM
Is this running in on an update busines rule? Set on relevant table. My example uses incident.
Then in the advance section, create a script like this, that fires off an event. The create email notifcations to respond to that event?
Thanks...Gary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 08:27 AM
Hi @Gary Fawcett1 ,
This is running on the Notification. I was able to get it to works with the following condition. Thank you for suggestion.
var getPriority = current.variables.select_Priority;
if (getPriority == 'low_priority') {
answer = true;
}