Click HERE to see how Saviynt Intelligence is transforming the industry. |
11/16/2023 01:47 PM
I have a requirement to create a birthright rule for new hires. The conditions should be looking for the employeetype and statues key country and should only trigger 20 days before there hire date. I'm assuming to meet this I have to use an Advance Query. This is what I have so far but it does not seem to work.
employeetype = 'regular' AND Statuskey= '1' AND DATE_ADD (startdate(), INTERVAL -20 DAY) AND country ='USA'
Solved! Go to Solution.
11/16/2023 09:45 PM - edited 11/16/2023 11:46 PM
@cdavis2 try below samples
a.employeetype = 'regular' AND a.statuskey= '1' AND country ='USA' AND DATEDIFF(a.startdate,curdate())<=20
a.employeetype = 'regular' AND a.statuskey= '1' AND country ='USA' AND DATEDIFF(a.startdate,curdate())between 20 and 0
refer below forum thread.
11/16/2023 09:46 PM
use datediff function
a.statuskey = 1 and datediff (curdate(), a.startdate) between -7 and 0
11/16/2023 11:38 PM
DATEDIFF function should help :
Sample :
a.employeetype = 'regular' AND a.statuskey= '1' AND country ='USA' AND DATEDIFF(a.startdate,curdate()) between -7 and 0
11/22/2023 09:02 AM
So the route I took was making a pre process in the connector. To calculate the datediff and if its true populate the value Future Hire in a custom property. So in the rule all I had to do is make it look for that value in the customproperty and action it based off that. I feel that adding that much complexity in the rule itself is not liking the code. I did not trust it so I went the pre process route instead.