Click HERE to see how Saviynt Intelligence is transforming the industry. |
12/27/2023 08:45 AM
Hi all,
I need to create account name rule which will have users firstname +lastname.
But if there's a duplicate / users with same name, it should include 1st letter of middle name and if there's 3 users then 1st 2 letters of middlename at the end.
How can I do this using advanced query??
Solved! Go to Solution.
12/27/2023 09:17 AM
concat(users.firstname,users.lastname)#concat(users.firstname,substring(users.middlename,1,1),users.lastname)#concat(users.firstname,users.lastname,substring(users.middlename,1,2))
12/27/2023 09:21 AM
Thanks for the response @rushikeshvartak . may i know why you used '#' in the query?
sometimes I have also see 3#(###) also . Why we use this. and what does it mean here?
12/27/2023 09:22 AM
# is internally used to seprator two account name rule. different places different logic is used in account name rule seprator is single hash #
12/27/2023 09:24 AM
Understood, but where we are mentioning if its duplicate and use second one?? will it understand by default?
12/27/2023 09:25 AM
Its saviynt logic if first does not satisfy it will evaulte next using seprator #
12/27/2023 09:20 PM - edited 12/27/2023 09:21 PM
@rushikeshvartak Instead of checking duplicate username and going for next rule. can we do the same if users have same first name then go for next rule???
12/27/2023 09:57 PM
You can write case when then logic of SQL.
12/27/2023 10:34 PM
Can you please provide a general syntax, I'm not getting how to check even when we use case when .
12/27/2023 11:32 PM
concat(users.firstname, users.city, (case when (users.lastname = 'Admin')
THEN
concat(users.firstname,users.lastname)
ELSE
users.lastname
END))
01/04/2024 05:27 AM - edited 01/04/2024 05:27 AM
I used Case when condition for some other condition. If i use it for 1 time its working, but there is a duplicate i need to ad few more character from username, But its not working, and showing account name blank.
can we use case when multiple times like
concat(case when..... end, substring(users.username,1,1) # concat(case when..... end, substring(users.username,1,2)
01/04/2024 06:21 AM
You can test query from data analyzer before adding & check
01/04/2024 06:32 AM - edited 01/04/2024 06:34 AM
Yes we can but Its having a Saviynt format like we have to separate the conditions with # , to remove duplicate and next condition etc.This cannot be done using Data analyzer.
Basically if I test each query separately its working, but I i use it after # its not working that too if i include case when condition in both query else it works flawlessly.
01/04/2024 12:00 PM
Use case when then end
01/04/2024 10:54 PM
Yes..used the same
01/04/2024 11:13 PM
share query