How do I get the characters before a specific character?

zdlee
New Contributor

How do I get the characters before a specific character?

Let's say I have column username where the drop down is a list. A username is "JonSmith-81". I'd like the next line item, lets call it alias, to just pull "JonSmith" from this string. The alias line item is formatted as text. What would be the formula to return just "JonSmith" in alias line item? I seem to get an error due to the mismatch in formatting.

3 REPLIES 3
rob_marshall
Moderator

Re: How do I get the characters before a specific character?

@zdlee 

 

I believe we answered this in your previous post on Friday...

 

https://community.anaplan.com/t5/Anaplan-Platform/How-do-I-get-the-characters-before-a-specific-char...

 

Rob

zdlee
New Contributor

Re: How do I get the characters before a specific character?

Hi @rob_marshall,

 

I forgot to mention the formats of the field and the solution provided didn't work due to the formats, as so it seems.

rob_marshall
Moderator

Re: How do I get the characters before a specific character?

@zdlee 

 

Then use the name() function around the User Name which is list formatted.