Skip to main content
Solved

attributecreator split a string by comma

  • July 16, 2016
  • 2 replies
  • 29 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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

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.