Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Technical Rule adding future time

cdavis2
Regular Contributor
Regular Contributor

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'

4 REPLIES 4

SumathiSomala
All-Star
All-Star

@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.

https://forums.saviynt.com/t5/identity-governance/how-to-configure-technical-rule-with-quot-startdat...

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

rushikeshvartak
All-Star
All-Star

use datediff function

a.statuskey = 1 and datediff (curdate(), a.startdate) between -7 and 0


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Manu269
All-Star
All-Star

DATEDIFF function should help :

Sample :

a.employeetype = 'regular' AND a.statuskey= '1' AND country ='USA' AND DATEDIFF(a.startdate,curdate()) between -7 and 0

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

cdavis2
Regular Contributor
Regular Contributor

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.