We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

How to Configure Technical Rule with "Startdate" Condition

KK
Regular Contributor
Regular Contributor

Hi.
I want to assign enterprise role to user if the user's startdate is within 7 days.
How to set Technical Rule condition for this?

I tried with below condition, but both condition do not work well.

Users.startdate Less than sysdate()+7

Users.startdate Less than date(sysdate()+7)

Best Regards,

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

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

Refer : https://forums.saviynt.com/t5/lifecycle-policies-rules/implementing-birthright-rules-technical-rules...


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

naveenss
All-Star
All-Star

Hi @KK 

Please use the below query in the technical rules (use advanced query for this)

date(a.startdate) < curdate()+7

The above query provides all the users having startdate less than the current date + 7 days. But I would suggest you have the condition as below.

date(a.startdate) = curdate() + 7

Configure a user update rule, make this user update rule as a detective one. And re-run the technical rule on a daily basis to check the condition for users whose startdate will be in next 7 days. 

Hope this helps! Let me know in case of any clarifications.

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

pmahalle
All-Star
All-Star

Hi @KK ,

Enable advanced config in your rule and use below query:

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


Pandharinath Mahalle(Paddy)
If this reply answered your question, please Accept As Solution to help other who may have a same problem. Give Kudos 🙂

KK
Regular Contributor
Regular Contributor

Hi @pmahalle @naveenss @rushikeshvartak 
Thanks all.
Bellow query seems to work.
a.statuskey = 1 and datediff (curdate(), a.startdate) between 0 and 7
But, there is still issue
With this query, if start date is today, the rule is run.
But, if start date is tomorrow, the rule does not run.
Tomorrow is within 7 days, so, the rule should run.

Do you have any idea?

Hi @KK ,

Ohh so you want 7 days ahead of the start date not behind. In that case use below query.

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


Pandharinath Mahalle(Paddy)
If this reply answered your question, please Accept As Solution to help other who may have a same problem. Give Kudos 🙂

KK
Regular Contributor
Regular Contributor

@pmahalle 
Thanks, it works.