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 using DATE_ADD function

RV
Regular Contributor
Regular Contributor

I have a technical rule to grant an AD Group based on below conditions, but when the rule runs I am seeing below error in the error log.   I followed documentation and used the DATE_ADD function with INTERVAL 1 DAY but looks like Saviynt doesnt like 1 in the DATE_ADD function.    Can anyone provide if there are any workarounds to use INTERVAL 1 DAY in a Technical rule?

(a.customproperty19 = DATE_ADD(curdate(),INTERVAL 1 DAY)) AND (a.statuskey=1) AND (a.employeeid is not null)

 


2022-12-29 19:50:34,214 [quartzScheduler_Worker-19] ERROR hql.PARSER - line 1:3128: unexpected token: ON
2022-12-29 19:50:34,292 [quartzScheduler_Worker-19] ERROR hql.PARSER - line 1:136: unexpected token: 1

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

did it worked using data analyazer/ preview mode in rule


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

RV
Regular Contributor
Regular Contributor

Yes.  It works in both data analyzer and Preview mode of the Technical rule.

Screenshot


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

RV
Regular Contributor
Regular Contributor

RV_0-1672757963555.png

 

Saathvik
All-Star
All-Star

Try this

(a.customproperty19 = (curdate() + 1) AND (a.statuskey=1) AND (a.employeeid is not null)

 

Since query used in rule will be HQL and I don't think it does support all native database date functions. So try use above format to see if that works


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

RV
Regular Contributor
Regular Contributor

Thanks.  I ended up using curdate()+1, but is there a bug in Saviynt that it is not accepting INTERVAL X DAY?  If so, documentation has to be updated to reflect the dame.

I have updated my comment with reason why date function is not working. 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.