Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Extract Name from Column

Hi, I have a dimension called UserDN that has full user names in the column. I am trying to get the user name extracted out into a separate column so it looks like the mock up below. I have used the subfield expression but it comes out as "Smith\,John,OU". Any suggestions would be appreciated.

2-1-2018 9-19-49 AM.jpg

1 Solution

Accepted Solutions
ali_hijazi
Partner - Master II
Partner - Master II

try:

replace(replace(textbetween(UserDN,'CN=',',OU='),',',''),'\','')

I can walk on water when it freezes

View solution in original post

5 Replies
m_woolf
Master II
Master II

wrap your subfield expression with replace twice. Once to remove "\" and once to remove ",OU"

ali_hijazi
Partner - Master II
Partner - Master II

try:

replace(replace(textbetween(UserDN,'CN=',',OU='),',',''),'\','')

I can walk on water when it freezes
vvvvvvizard
Partner - Specialist
Partner - Specialist

SubField(Replace( Replace(UserDN,'\',''),'CN=',''),',',1)  &','&

SubField(Replace( Replace(UserDN,'\',''),'CN=',''),',',2)

zebhashmi
Specialist
Specialist

SubField(Replace(left(UserDN,3),""&Replace(Right(UserDN,25),""&Replace('\,',' ')

or may be this

SubField(Replace(Replace(left(Replace(Right(UserDN,25),' ')),3),' '),'\',' ')



looks like Ali's would work fine just add

replace(replace(textbetween(UserDN,'CN=',',OU=term and contractors'),',',''),'\',' ')

Anonymous
Not applicable
Author

Thank you everyone!