12/01/2022 03:22 AM
Hi Experts,
We are seeing username is getting created with spaces, Although the last name have space or any special character it should consider it and eliminate the same and create it. but that is not happing especially with space.( something if last name is like St. Andrews).
Username Generation rules
Rule1
Users
FirstName Initial character: 1
Last Name :Initial character: 7
We were asked to use the advance config in register user rule to get the space removed.
We are trying with multiple combinations as below,but still we have not got to resolving it yet
CASE WHEN (users.username is NOT NULL) then CONCAT(substring(users.firstname,1,1), substring(REPLACE(users.lastname,' ',''),1,7)) ELSE CONCAT(substring(users.firstname,1,1), substring(REPLACE(users.lastname,' ',''),1,5),FLOOR(RAND()*100)) END ### CASE WHEN (users.username is NULL) then CONCAT(substring(users.firstname,1,1), substring(REPLACE(users.lastname,' ',''),1,5),FLOOR(RAND()*100)) ELSE CONCAT(substring(users.firstname,1,1), substring(REPLACE(users.lastname,' ',''),1,5),FLOOR(RAND()*100)) END
Thanks
Shyam
12/01/2022 08:17 AM - edited 12/01/2022 08:23 AM
Hello @sundas7
I see you are on v5.5sp3.x. As per the FD article the advance config is available from v2020.1.x as shown below snip.
Could you please refer below documentation.
Thanks & Regards
Srinivas
12/01/2022 09:38 AM
Does query running properly in data analyzer?
12/05/2022 09:50 AM
Hi @rushikeshvartak ,
We could not be able to run on data analyzer.
currently as mentioned the above query's first condition working as expected but when the user having same firstname and lastname(if the username already exist in DB) it should print the else one, it is not happening here.
Regards,
Chandan Gowda
12/05/2022 03:30 PM
12/14/2022 02:06 AM
Whenever i was tried to run the above query on data analyzer, showing an error. unable to fetch data from users table.
Thanks,
Chandan Gowda
12/14/2022 03:37 AM
Use analytics