<?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: Field Calculation Question in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198899#M11377</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ryan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use an expression in the calculate field similar to :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Left of -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;left([fieldname],instr([fieldname],"-")-1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right of -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mid([fieldname],instr([fieldname],"-"),len([fieldname] - instr([fieldname],"-")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right([fieldname],len([fieldname] - instr([fieldname],"-"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the instr function gives the position of a text string within another, and the left function extracts a string from another one, as does mid &amp;amp; right&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anthony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Feb 2013 16:12:35 GMT</pubDate>
    <dc:creator>AnthonyGiles</dc:creator>
    <dc:date>2013-02-13T16:12:35Z</dc:date>
    <item>
      <title>Field Calculation Question</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198898#M11376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a name field attributed with a string that has a hyphen in the middle...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'text1... - text2...'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to use the field calculator to calculate another field based on everything to the right of the hyphen, excluding the hyphen and everything to the left so the result will look like this...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'text2...'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that the number of characters for text1 and text2 is variable throughout the feature class so the RIGHT and LEFT functions will not work. Any ideas without having to revert to a python script?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2013 15:57:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198898#M11376</guid>
      <dc:creator>RyanHinesley</dc:creator>
      <dc:date>2013-02-13T15:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculation Question</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198899#M11377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ryan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use an expression in the calculate field similar to :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Left of -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;left([fieldname],instr([fieldname],"-")-1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right of -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mid([fieldname],instr([fieldname],"-"),len([fieldname] - instr([fieldname],"-")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right([fieldname],len([fieldname] - instr([fieldname],"-"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the instr function gives the position of a text string within another, and the left function extracts a string from another one, as does mid &amp;amp; right&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anthony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2013 16:12:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198899#M11377</guid>
      <dc:creator>AnthonyGiles</dc:creator>
      <dc:date>2013-02-13T16:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculation Question</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198900#M11378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Worked perfectly. Thanks so much.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ryan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2013 17:25:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198900#M11378</guid>
      <dc:creator>RyanHinesley</dc:creator>
      <dc:date>2013-02-13T17:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculation Question</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198901#M11379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ryan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Glad it worked, please don't forget to mark the post as answered,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anthony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2013 18:42:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198901#M11379</guid>
      <dc:creator>AnthonyGiles</dc:creator>
      <dc:date>2013-02-13T18:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculation Question</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198902#M11380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anthony,&lt;/P&gt;&lt;P&gt;Can a version of your code help me to switch names within a field?&amp;nbsp; From "Smith, John" to "John Smith".&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;Stew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2016 14:26:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198902#M11380</guid>
      <dc:creator>StewartGalloway</dc:creator>
      <dc:date>2016-08-12T14:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculation Question</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198903#M11381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;" ".join(a.split(", ").__reversed__())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where 'a' can be substituted with !YourFieldName!&lt;/P&gt;&lt;P&gt;use the python parser of course.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2016 14:47:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198903#M11381</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-12T14:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculation Question</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198904#M11382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wow, thanks Dan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2016 14:54:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculation-question/m-p/198904#M11382</guid>
      <dc:creator>StewartGalloway</dc:creator>
      <dc:date>2016-08-12T14:54:34Z</dc:date>
    </item>
  </channel>
</rss>

