Skip to main content
Question

AttributeCreator FindString to find the last occurrence of a string

  • October 24, 2016
  • 2 replies
  • 79 views

Forum|alt.badge.img

Hello, I have a full StreetAddress field and separate City/State/Zip fields. I want to parse Street only out from the StreetAddress field. I used AttributeCreator, Left() and FindString(). Please see below. Most records were correctly parsed out except for few ones like the second record in the table below. Is there a way for FindString() to return the last occurrence of a string? or any other ways for this purpose?

@Left(@Value(StreetAddress),@FindString(@Value(StreetAddress), @Value(City)) + 1)

 

StreetAddressCityStateZip1 Google Way Mountain View, CA 12345Mountain ViewCA12345

 

1 Houston Road Houston, TX 23456HoustonTX23456

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

todd_davis
Influencer
Forum|alt.badge.img+23
  • Influencer
  • October 24, 2016

Just basing this off what you have shown here, so not sure what all your data looks like.

Why don't you stringconcatenate: (this would be what it looks like in the bottom window) start off with a space ), @Value(CA) @Value(Zip).

Now you could just use the attribute created in the stringreplacer and replace on the streetaddress, replace with a blank.

This will avoid the issue you are having with a single attribute like Houston, not being unique in the entire string.


Forum|alt.badge.img
  • Author
  • October 25, 2016

thanks. StringContatenator works.