and more in a single search tool across platforms. Read the announcement here. |
02/19/2024 09:54 PM
Hi,
We have some existing users who's systemusername is currently blank or something other than their username.
We want to keep their systemusername the same as their username. We are trying to do it through preprocessor but it's not working.
{
"ADDITIONALTABLES": {
"USERS": "SELECT * FROM USERS"
},
"COMPUTEDCOLUMNS": [
"SYSTEMUSERNAME",
"USERNAME"
],
"PREPROCESSQUERIES": [
"UPDATE CURRENTUSERS SET NEWUSERDATA.SYSTEMUSERNAME = CURRENTUSERS.USERNAME WHERE NEWUSERDATA.USERNAME= CURRENTUSERS.USERNAME AND NEWUSERDATA.EMPLOYEEID = CURRENTUSERS.EMPLOYEEID ;"
]
}
This is our preprocessor. Please note that we are using employeeID as reconciliation field and also this should only working for currentUsers since we can generate the systemusername through global config for new users.
Thank you.
02/20/2024 02:56 AM
Try below ,
"ADDITIONALTABLES": {
"USERS": "SELECT SYSTEMUSERNAME,USERNAME FROM USERS"
},
"COMPUTEDCOLUMNS": [
"SYSTEMUSERNAME",
"USERNAME"
],
"PREPROCESSQUERIES": [
"UPDATE CURRENTUSERS SET NEWUSERDATA.SYSTEMUSERNAME = CURRENTUSERS.USERNAME WHERE NEWUSERDATA.USERNAME= CURRENTUSERS.USERNAME AND NEWUSERDATA.EMPLOYEEID = CURRENTUSERS.EMPLOYEEID ;"
]
}
am not sure exiting users it work or not , try via csv file?
02/20/2024 05:43 AM
Please use CSV upload for updating systemusername with the value of username for the existing users.
For new users you can use the systemusername generation rule.
Regards,
Dhruv Sharma