- 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 10:49 AM
would i be able to use this instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 10:54 AM
Not sure if getDisplayValue() work here, so you can try just:
if (current.variables.current_location == 'Toronto'){ //use your actual value here - Toronto may be toront, trnt, etc - check this.
answer = true;
}
answer = false;
Also, it's very important where you set the notification - on REQ or RITM ?
- 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:28 AM
Glad to hear that 🙂
It seems you indeed need to compare the values without using getDisplayValue().
Anyways - as there are lots of things that might go wrong with RITMs and notifications, I try to keep to this approach - I create 1 business rule in which I am triggering events (in turn firing my notification) where I can be 100% sure of what is my catalog item name (via my RITM or if the notification is needed to be on REQ then there) dotwalking it and be confidents of the states of any field I need for my logic.
Just an idea of mine for you of course - I do it that way from a long time and it's working fine for me for the past 5 years 🙂