Skip to main content
Solved

attributecreator split a string by comma


Forum|alt.badge.img

I have a NAME field with a format of 'lastname, firstname'. How to get the lastname using AttributeCreator? I tried Substring() but couldn't find a IndexOf() function. Please help.

Best answer by mark_f

You can use a StringSearcher with a Regex.

Or with AttributeCreator try:

@Substring(@Value(NAME),0,@FindString(@Value(NAME),","))

0684Q00000ArKqGQAV.jpg

View original
Did this help you find an answer to your question?

2 replies

Forum|alt.badge.img+2
  • Best Answer
  • July 16, 2016

You can use a StringSearcher with a Regex.

Or with AttributeCreator try:

@Substring(@Value(NAME),0,@FindString(@Value(NAME),","))

0684Q00000ArKqGQAV.jpg


Forum|alt.badge.img
  • Author
  • July 17, 2016
mark_f wrote:

You can use a StringSearcher with a Regex.

Or with AttributeCreator try:

@Substring(@Value(NAME),0,@FindString(@Value(NAME),","))

0684Q00000ArKqGQAV.jpg

thank you so much! FindString works for me.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings