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

populate manager and manager email attribute

Abdul_Gaffar
New Contributor II
New Contributor II

Hi Team,

we are trying to populate  manager and manager email by using the following preprocessor queries

"UPDATE NEWUSERDATA SET NEWUSERDATA.owner = (select CURRENTUSERS.USERNAME from CURRENTUSERS where CURRENTUSERS.EMPLOYEEID=NEWUSERDATA.CUSTOMPROPERTY44 limit 1)",
"UPDATE NEWUSERDATA SET DISPLAYNAME = CONCAT(lastname,',',' ',firstname)",
"UPDATE NEWUSERDATA SET preferedfirstname = CASE WHEN (preferedfirstname ='' or preferedfirstname is null ) THEN firstname ELSE preferedfirstname END;",
"UPDATE NEWUSERDATA SET STATUSKEY = case when (LeaveStatus='INACTIVE' or LeaveStatus='SUSPEND' or LeaveStatus='Suspend') then '0' else '1' end",
"UPDATE NEWUSERDATA nu, currentusers cu set nu.customproperty12 = cu.email where nu.owner = cu.username"

Here we specify the customproperty44 value as the employeeid of an existing user and which process the owner attribute , followed by the manager email that is stored in customproperty12 attribute

previously it was working fine , however now the manager and the customproperty12 values are not getting populated

can you please suggest what shall be the amendments that can be made in the preprocessor query

Thanks

Abdul Gaffar 

2 REPLIES 2

rushikeshvartak
All-Star
All-Star

Do you see any error in logs. Try to upload 1 user with csv and preprocessor query and check logs 


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

Abdul_Gaffar
New Contributor II
New Contributor II

Hi @rushikeshvartak ,

I was not able to find any SQL related errors 

PFB the errors below:

"2024-01-29T07:33:10.375+00:00","ecm","services.SaviyntCommonUtilityService","http-nio-8080-exec-269-5b7nl","ERROR","could not execute query; SQL [select max(cast(users0_.USERNAME as signed)) as col_0_0_ from USERS users0_]; nested exception is org.hibernate.exception.DataException: could not execute query"
"2024-01-29T07:33:10.375+00:00","ecm","services.SaviyntCommonUtilityService","http-nio-8080-exec-269-5b7nl","DEBUG","Error finding the max user key from username so trying userkey-Executing Qry - select max(u.id) from Users u"

Thanks

Abdul Gaffar