<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Remove Characters using Field Calculator in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584308#M19330</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I lifted this from elsewhere but very useful. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;this is VB , not python&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;split on character - To split a field into a list &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;----------&amp;nbsp; In code Block ----------&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

dim splitList
dim value

splitList= split( [Feild1], ";")
if ubound(splitList) &amp;gt; 1 then 'if there's no comma, there's only one value in the splitList array and the next statement would error out
&amp;nbsp; value = splitList(0)
end if&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;----------&amp;nbsp; In Field =&amp;nbsp;&amp;nbsp; ----------&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
value&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 01:07:17 GMT</pubDate>
    <dc:creator>JamesHood</dc:creator>
    <dc:date>2021-12-12T01:07:17Z</dc:date>
    <item>
      <title>Remove Characters using Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584302#M19324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've had this issue in the past, and don't think I've ever come up with a great way to resolve it other than doing a manual cut/paste for each field.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have one field of attributes that has an address and a direction (100 S Main St - 2NW; 1343 W Kimberly Rd - 3WSE; etc) and I need to calculate just the address portion (100 S Main St; 1343 W Kimberly Rd; etc) into a new field.&amp;nbsp; I know that I can use the Left/Mid/Right functions to remove a specific number of characters from a string, but my proplem is that that number will vary.&amp;nbsp; Is there any way that I can calculate only the characters to the left of the hyphen (as all attributes have the hyphen) into a new field?&amp;nbsp; Or by the same token, remove all characters to the right of, and including, the hyphen?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Stephanie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2011 13:29:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584302#M19324</guid>
      <dc:creator>StephanieMacuga</dc:creator>
      <dc:date>2011-12-30T13:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Characters using Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584303#M19325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use Split to separate out the parts of the address. The syntax would be something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;addresses = Split([field], " - ")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;address = addresses(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;direction = addresses(1)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2011 13:59:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584303#M19325</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2011-12-30T13:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Characters using Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584304#M19326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Stephanie - &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not a VB Script or Python person and I'm sure there's some code that would do it easier than my suggestion.&amp;nbsp; There's the&lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00260000000m000000.htm"&gt; Standardize Addresses &lt;/A&gt;&lt;SPAN&gt; that breaks up your addresses into multiple fields.&amp;nbsp; From there you can create a new address field and concatenate the address fields you wish to keep into one field and delete the rest.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Robert LeClair&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Esri-Denver&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2011 14:00:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584304#M19326</guid>
      <dc:creator>Robert_LeClair</dc:creator>
      <dc:date>2011-12-30T14:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Characters using Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584305#M19327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Stephanie,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached is an example on how to do this using the field calculator.&amp;nbsp; Make sure that 'Python' is checked at the top.&amp;nbsp; In the example, the values exists in a field called 'FullAddr', and I'm calculating the value to the left of the hypen to a field called 'Address'.&amp;nbsp; You can do the same for the text to the right of the hypen.&amp;nbsp; You will just need to change [0] to [1].&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2011 14:23:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584305#M19327</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2011-12-30T14:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Characters using Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584306#M19328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Stephanie,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can extract just the address portion of your string with the Python statement:&lt;/SPAN&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;address=input[:input.find("-")].strip()&lt;/PRE&gt;&lt;SPAN&gt;where input is your original string with both address and direction.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 15:42:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584306#M19328</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2012-01-03T15:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Characters using Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584307#M19329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks to everyone for the suggestions!&amp;nbsp; I actually found an existing thread (eventually!!) that allowed me to do what I needed.&amp;nbsp; Using a combination of the Left and InStr functions as found in this post, &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/28351-VBScript-Left()-amp-InStr()-functions-ArcView-10"&gt;http://forums.arcgis.com/threads/28351-VBScript-Left()-amp-InStr()-functions-ArcView-10&lt;/A&gt;&lt;SPAN&gt;, I was able to get what I needed!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 18:58:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584307#M19329</guid>
      <dc:creator>StephanieMacuga</dc:creator>
      <dc:date>2012-01-05T18:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Characters using Field Calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584308#M19330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I lifted this from elsewhere but very useful. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;this is VB , not python&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;split on character - To split a field into a list &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;----------&amp;nbsp; In code Block ----------&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

dim splitList
dim value

splitList= split( [Feild1], ";")
if ubound(splitList) &amp;gt; 1 then 'if there's no comma, there's only one value in the splitList array and the next statement would error out
&amp;nbsp; value = splitList(0)
end if&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;----------&amp;nbsp; In Field =&amp;nbsp;&amp;nbsp; ----------&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
value&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:07:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/remove-characters-using-field-calculator/m-p/584308#M19330</guid>
      <dc:creator>JamesHood</dc:creator>
      <dc:date>2021-12-12T01:07:17Z</dc:date>
    </item>
  </channel>
</rss>

