- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 10:12 AM
Good Day,
i am trying to configure an email notification to go off the following information.
However, the Variables condition for Current Location isn't working and i will need to script this out.
So is it possible to have the OOC seen above + Advance condition running for the Current location like
var loc = current.variables.current_location.getDisplayValue();
if (loc == 'Toronto'){
answer = true;
}
answer = false;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 11:05 AM
i found the solution that will work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 11:36 AM
This is interesting, can you explain more?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 11:50 AM
Sure, for example in my experience so far (like8++ yrs) there are always some discrepencies between dev, test & prod. Admins tend to change or add choices which makes the condition builder expression invalid if you use such a choice made on dev let say. Also it depends when to who and what email you want to send. You can handle this with standard notifications as you did it, but (at least in the sense of creating and managing these) I prefer using events. If you open the task table (I think incident table have better example) you can find business rules managing exactly that - firing events on a given conditions where more complicated logic is involved. And you can use one BR to handle all of your events with if/if else/else or swith - depending on your requirements.
Not to mention that if your sys_id's are different of your cat items then you are in trouble for sure. To avoid such cases I add my own properties which I just get and use instead of hardcoded values (like if(current.name == gs.getProperty("my_super_incident")) - where my_super_incident is either the sys_id of the cat item or the name - but easily changable via simple property.