Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/27/2023 04:33 AM
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
We didn't find any issue in the logs.
Thanks,
Saimeghana
Solved! Go to Solution.
07/27/2023 05:24 AM
Hi @saimeghana ,
use Curdate() instead of sysdate() in the rule condition.
07/27/2023 09:18 AM
Hi,
Tried with Curdate(), still if we are facing the same issue.
Thanks,
Saimeghana
08/04/2023 02:58 AM
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
08/04/2023 03:30 AM
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?
08/04/2023 03:31 AM
Hi,
Yes, correct
08/04/2023 03:46 AM
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)"]
08/04/2023 04:05 AM
Tried but still it is not converting the date
08/04/2023 04:07 AM
@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.
08/04/2023 04:57 AM
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.
08/04/2023 06:55 AM - edited 08/04/2023 07:14 AM
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)))
08/07/2023 10:54 AM
Hi @pmahalle,
Tried with above query it's not created the task & it not triggered the rule.
Thanks,
Sai Meghana
08/06/2023 05:35 PM
Does preview shows records
08/07/2023 10:54 AM
we used user update rule
08/22/2023 11:17 PM
Hi,
This issue got resolved.
Solution: we written the java code for date conversion.
Thanks,
Sai Meghana