Removing part of a field using another

2400
3
04-06-2016 06:19 AM
HeatherHerrmann2
Occasional Contributor

I am trying to figure out how to remove the SECONDARYN street name from the IntersectionList field so that I'm only left with the street names other than what's in the SECONDARYN field.  I've attached a screenshot here.  I'm very, very new to Python so I would love some feedback and guidance on completing this task.

http://i.imgur.com/plSSOHU.png

Tags (1)
0 Kudos
3 Replies
DanPatterson_Retired
MVP Esteemed Contributor

The image isn't opening in my browser (Edge for Windows 10)

0 Kudos
HeatherHerrmann2
Occasional Contributor

Is this better?

SJdvPC

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

conceptually

>>> a = "ALTAVISA LOOP"
>>> b = "ALTAVISA LOOP & more stuff"
>>> c = b.replace(a+" & ","")
>>> c
'more stuff'
>>>

in terms of field calculator stuff add a new field and give it new name and do the calculations in it

ie NewList

use the python parser and the following expression in the field calculator

!IntersectionList!.replace(!SECONDARYN! + " & ", "")

If every record holds to the given format