- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2015 05:58 AM
Hi,
This is the situations:
My employee onboarding application generates requested items per selections of the manager in the application form. I do not want the manager to receive back anywhere between 1 to 15 emails, one for each RITM, saying that the request for the item has been received and is being handled. If possible, I would like the manager to receive one mail only summarizing the entire order, or not at all.
In the RITM form I have a reference field, which is filled only when the source of the RITM is the employee onboarding application. If it's a regular order not related to the onboarding process, that field is empty.
My problem is that when trying to configure the notification condition to send only when the reference field is empty does not work.
I tried, for instance:
if(current.u_new_employee_req == '') {
answer=true;
}
but other fields do not work as well.
This field (u_new_employee_req) is a reference field in the request, which is filled by the onboarding application and is cascaded to the RITM via a business rule, upon the creation of the RITM.
I am wondering maybe the request is generated before all the fields are populated?
Is there any way to tell the notification not to be sent if the source of creation is the onboarding app?
Thanks
Harel
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2015 02:09 PM
You can do this using Normal conditions instead of using advanced condition. In your script you need to use && instead of ^
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2015 09:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2015 11:02 AM
Thanks Doug,
Almost there!
Indeed, one of the items is specific to the onboarding request, but the rest are not. What *is* specific is a variable field within the RITM, called employee. If the value in it is 'Yes' then it is an employee onboarding request. So I added the following advance condition, which does not work:
if((current.variables.employee == 'No')^(current.cat_item.sys_id != '670806ce09963d402fc62090a83df074')) {
answer=true;
}
the first part does not work. The second part, with the specific sys_id, does.
Any suggestions? are the variables even checked at this stage?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2015 01:37 PM
what table is your notification running on... i don't have much experience with advanced conditions sadly. but if current.variables isn't working it maybe the table the notification is on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2015 02:09 PM
You can do this using Normal conditions instead of using advanced condition. In your script you need to use && instead of ^
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2015 12:20 PM
Hi Saritha,
Using && actually did the trick, but then I realized I don't need the second part, because that specific RITM had the variable employee in it already, so in the end, it looks like this:
if(current.variables.employee == 'No') {
answer=true;
}
Thank you and thanks Doug, who set me on the right path!
Harel