Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
jmonroe918
Creator II
Creator II

Trim Login IDs

I am loading data from a field that lists a user Last and First Names and then their login id's in parentheses. See below:

Orginator:

Monroe, Jeff (jmonroe)

Smith, John (jsmith)

Johnson, Edward (ejohnson)

I want to strip out the UserID; the name in parentheses. As you can see they are of varying length so I can't use the standard 'Left' command with a number. I need to determine the length of the UserID and then subtract from the Length of the string, etc.

Thanks.

Jeff

1 Solution

Accepted Solutions
jmonroe918
Creator II
Creator II
Author

Sunny:

Just as you sent your solution I figured out how to use:

     Left(Originator, index(Originator, '(')-1) as Orig

Yours worked, too.

Thanks.

Jeff

View solution in original post

2 Replies
sunny_talwar

Try this:

Trim(SubField(Orginator, '(', 1)) as UserID

jmonroe918
Creator II
Creator II
Author

Sunny:

Just as you sent your solution I figured out how to use:

     Left(Originator, index(Originator, '(')-1) as Orig

Yours worked, too.

Thanks.

Jeff