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

how to compare customproperty attribute with sysdate() in technical rule

Jaya
Regular Contributor II
Regular Contributor II

Hi All,

I want to create a detective technical rule through which we can compare a user's custom attribute with function sysdate()

I have used query- '(a.statuskey=1) AND (date(sysdate()) = date(a.customproperty45))' but this query isn't working. Customproperty45 is also DATE type field.

Kindly suggest solution for this.

Jaya_0-1670934869397.png

Thanks

Jaya karothia

 

Thanks
Jaya Karothia
7 REPLIES 7

Saathvik
All-Star
All-Star

What is the format you are saving date value in CP45?


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

Jaya
Regular Contributor II
Regular Contributor II

Hi Sk,

We have chosen attribute type as DATE in Global config for CS45.

Jaya_0-1670946970963.png

Jaya_1-1670947217751.png

 

Thanks

Jaya

Thanks
Jaya Karothia

I see it is working as expected for me with below condition

(a.statuskey=1) AND (date(a.CREATEDATE)=date(sysdate()))

sk_1-1670947601066.png

Can you check if you have any users with matching condition which you used?

 

 


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

Jaya,

From above screenshot I see that User Form field you made a date field which you mapped to CP45 of user. But does CP45 of user table is of date type?


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

Jaya
Regular Contributor II
Regular Contributor II

yes i think you are correct I just checked the datatype of CP45 it's tinytext.

Thanks
Jaya Karothia

rushikeshvartak
All-Star
All-Star

a.statuskey=1 and a.customproperty45=date_format(sysdate(),'%b %d, %Y')

rushikeshvartak_0-1670948830782.png

 


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

Jaya
Regular Contributor II
Regular Contributor II

Thank you so much Rushikesh.

Thanks
Jaya Karothia