Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/24/2023 07:18 AM
Hi ,
we are trying to map the manager with current manager username at the user's update history it is displaying as the manager's field is updated.However, the same does not get replicated when we look around the user profile
below is the preprocessor query leveraged to update the manager and following is the error am facing through
The new userdata has saviynt generated username but the same is not visible in the user profile
preprocessor query:
{
"ADDITIONALTABLES": {
"USERS": "SELECT USERKEY FROM USERS"
},
"COMPUTEDCOLUMNS": [
"customproperty20",
"DISPLAYNAME",
"MANAGER"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA SET CUSTOMPROPERTY20 ='Workday'",
"UPDATE NEWUSERDATA SET DISPLAYNAME = CONCAT(lastname,'',ifnull(substring(middlename,1),''),'',firstname)",
"UPDATE NEWUSERDATA SET NEWUSERDATA.MANAGER=(select CURRENTUSERS.USERNAME from CURRENTUSERS where CURRENTUSERS.EMPLOYEEID=NEWUSERDATA.MANAGER)"
]
}
Error: Error in Users Import - Error while processing data: Unknown column 'TEMPUSERS_8999.USERNAME' in 'field list'
please suggest the correct query to update the manager field
Regards,
Abdul Gaffar
05/24/2023 07:22 AM
Can you also add username in below query and check?
"USERS": "SELECT USERKEY,USERNAME FROM USERS"
},
Thanks
Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.
05/24/2023 07:52 AM
Hi @dgandhi ,
The following is the error message just as above:
Error in Users Import - Error while processing data: Unknown column 'TEMPUSERS_9000.EMPLOYEEID' in 'where clause'
05/24/2023 07:55 AM
Include all the columns that will be used in your computation. Can you add Employeedid also in the above query and check?
"USERS": "SELECT USERKEY,USERNAME,EMPLOYEEID FROM USERS"
Thanks
Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.
05/24/2023 08:20 AM
Hey @dgandhi ,
the error is as follows:
Error in Users Import - Error while processing data: Subquery returns more than 1 row |
Thanks,
Abdul Gaffar
05/24/2023 08:27 AM
The original issue is resolved, this is an issue in the logic of your query.
Thanks
Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.
05/24/2023 08:33 AM
Ok , but how shall this be addressed please elaborate
Thanks,
Abdul Gaffar
05/24/2023 08:45 AM
Can you please elaborate more on the use case that you are trying to achieve. Its not quite clear.
Thanks
Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.
05/24/2023 09:25 AM
Hey @dgandhi ,
The users have been updated with the manager field via user import job as follows
However, we cannot see the same if we go to user details pane as it still shows the old value (starts with 000) and this oldvalue is basically the employeeid of the manager
to update the manager field with the updated username I tried with the above specified preprocessor query and facing issues as shown above
Thanks,
Abdul Gaffar
05/24/2023 10:42 AM
I don't understand the use case. If manager was updated as part of rule and it is showing in the update history but not reflecting on user's UI then that needs to be fixed ( why on UI the new manager is not reflecting correctly.)
Thanks
Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.
05/24/2023 10:44 AM
along with manager also update owner field
05/25/2023 12:47 AM
Yes , not sure why the updated manager is not visible even after update in the manager value
and I did specify owner in the preprocessor query as follows:
{
"ADDITIONALTABLES": {
"USERS": "SELECT USERKEY,USERNAME,EMPLOYEEID FROM USERS"
},
"COMPUTEDCOLUMNS": [
"customproperty20",
"DISPLAYNAME",
"MANAGER",
"OWNER"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA SET CUSTOMPROPERTY20 ='Workday'",
"UPDATE NEWUSERDATA SET DISPLAYNAME = CONCAT(lastname,'',ifnull(substring(middlename,1),''),'',firstname)",
"UPDATE NEWUSERDATA SET NEWUSERDATA.MANAGER=(select CURRENTUSERS.USERNAME from CURRENTUSERS where CURRENTUSERS.EMPLOYEEID=NEWUSERDATA.MANAGER)"
]
}
and the error is "
Error in Users Import - Error while processing data: Subquery returns more than 1 row |
" and as the error specifies it returns more than 1 row if the query can be like
UPDATE NEWUSERDATA SET NEWUSERDATA.MANAGER=(select CURRENTUSERS.USERNAME from CURRENTUSERS
Thanks,
Abdul Gaffar