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

Issue in Change password task creation

saimeghana
Regular Contributor
Regular Contributor

Hi Team,

We have an issue while creating the change password task. In the rule we gave the condition like email is updated and startdate and Date of arrival BU related conditions then it should trigger the change password task.

When we try with start date condition it is working.

Issue:  If we try with Date of arrival BU > sysdate() then rule itself is not triggered.

date of arrival BU is stored in user custom property and it's in 07-27-2023 format.

Please find the attached rule screen shot

saimeghana_0-1690451140729.png

We didn't find any issue in the logs.

Thanks,

Saimeghana

14 REPLIES 14

pmahalle
All-Star
All-Star

Hi @saimeghana ,

use Curdate() instead of sysdate() in the rule condition.


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

saimeghana
Regular Contributor
Regular Contributor

Hi,

Tried with Curdate(), still if we are facing the same issue.

Thanks,

Saimeghana

saimeghana
Regular Contributor
Regular Contributor

Hi @pmahalle,

For the above issue we are trying to convert the date (dd-mm-yyyy to yyyy-mm-dd) in sav file with the help of preprocessor query.

Please let me know is that feasible to use, Please find the below query for reference.

1) "PREPROCESSQUERIES":["UPDATE NEWUSERDATA SET NEWUSERDATA.CUSTOMPROPERTY25=(select DATE_FORMAT(CURRENTUSERS.CUSTOMPROPERTY25,'yyyymmdd') from CURRENTUSERS"]

2) "PREPROCESSQUERIES":["UPDATE NEWUSERDATA SET NEWUSERDATA.CUSTOMPROPERTY25=(select DATE_FORMAT(NEWUSERDATA.CUSTOMPROPERTY25,'yyyymmdd') from NEWUSERDATA"]

Thanks,

Saimeghana

Hi @saimeghana ,

So basically you want to convert the date format of the date storing in customproperty25 at the time of users creation and you are creating user using CSV upload, is that correct understanding?


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

saimeghana
Regular Contributor
Regular Contributor

Hi,

Yes, correct

Hi @saimeghana ,

Can you try below one:

"PREPROCESSQUERIES":["UPDATE NEWUSERDATA SET NEWUSERDATA.CUSTOMPROPERTY25=(select DATE_FORMAT(STR_TO_DATE(NEWUSERDATA.CUSTOMPROPERTY25,'%Y-%m-%d'), '%Y-%m-%d') from NEWUSERDATA)"]


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

saimeghana
Regular Contributor
Regular Contributor

Tried but still it is not converting the date

@saimeghana  why you want to convert the date. Since you are storing it in customproperty25 which is varchar, so you can store date in any format.


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

saimeghana
Regular Contributor
Regular Contributor

In User update rule we gave the condition like cp25 is updated or cp25 is not null, then it should create the change password task, we tried manually in saviynt by giving the date format like yyyy-mm-dd then it is creating the task. So we are planning to convert the date from dd-mm-yyyy to yyyy-mm-dd.

saimeghana_0-1691150254419.png

 

 

Hi @saimeghana ,

Okay, so you need conversion for update rule to be triggered. Can you try with advanced config and use below query in the conditions of the user update rule instead of changing the date format using  preprocessor query while creating user. Here we are performing conversion in update rule itself for comparision.

(a.statuskey=1 and ##a.email isupdated## and ((a.startdate>date_sub(curdate(), INTERVAL 3 DAY) and a.startdate is not null) or (STR_TO_DATE(a.customproperty25, '%d-%m-%Y')>date_sub(curdate(), INTERVAL 3 DAY) and a.customproperty25 is not null)))


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

saimeghana
Regular Contributor
Regular Contributor

Hi @pmahalle,

Tried with above query it's not created the task & it not triggered the rule.

Thanks,

Sai Meghana

Does preview shows records 


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

we used user update rule

Hi,

This issue got resolved.

Solution: we written the java code for date conversion.

Thanks,

Sai Meghana