<?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: Generate point names based on existing attribute columns? in ArcGIS Solutions Questions</title>
    <link>https://community.esri.com/t5/arcgis-solutions-questions/generate-point-names-based-on-existing-attribute/m-p/226440#M281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;txt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"JCB"&lt;/SPAN&gt;
site &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;194&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;"{}-{}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;txt&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; site&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;'JCB-194'&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Python parser, field calculator, assume 'txt is a field's name (ie it will look like this in python when you select it ... !txt!) Now assume your other field (or whatever) is ID (ergo !ID! in the field calculator...&lt;/P&gt;&lt;P&gt;So the above does the fancy conversion of a number to a string and you just whip a - in it.&amp;nbsp; In python 3.6, the format thing is replaced with a much simpler version, but you are some time away from being able to use it in Arc&lt;/P&gt;&lt;P&gt;Coming up ... to a python hopefully soon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; f&lt;SPAN class="string token"&gt;"{txt}-{site}"&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# python 3.6 and 3.7&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;'JCB-194'&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 11:01:56 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2021-12-11T11:01:56Z</dc:date>
    <item>
      <title>Generate point names based on existing attribute columns?</title>
      <link>https://community.esri.com/t5/arcgis-solutions-questions/generate-point-names-based-on-existing-attribute/m-p/226439#M280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to work out a calculation (either python or VBscript) in ArcGIS that will enable me to calculate mass site names that include both text and sequential numbers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a field calculation that will add the same text at the start of each attribute (e.g. "JCB-"), and then a number following it which corresponds to the site's numerical unique ID. So for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a site, with an ID of 1994. It was found at a location called JCB, so its site name needs to be JCB-1994. Then, the following site ID may be 458, so it would be JCB-458. As they may not be consecutive numbers, I need the field calculator to take the numerical information from the existing attribute ID and not simply run the next consecutive number.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody suggest a script I can use? I have used something similar in the past but have recently moved office and lost the reference sheet I was using &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thank you in advance! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jess&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 01:32:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-solutions-questions/generate-point-names-based-on-existing-attribute/m-p/226439#M280</guid>
      <dc:creator>JessicaBlackman</dc:creator>
      <dc:date>2017-03-13T01:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Generate point names based on existing attribute columns?</title>
      <link>https://community.esri.com/t5/arcgis-solutions-questions/generate-point-names-based-on-existing-attribute/m-p/226440#M281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;txt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"JCB"&lt;/SPAN&gt;
site &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;194&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;"{}-{}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;txt&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; site&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;'JCB-194'&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Python parser, field calculator, assume 'txt is a field's name (ie it will look like this in python when you select it ... !txt!) Now assume your other field (or whatever) is ID (ergo !ID! in the field calculator...&lt;/P&gt;&lt;P&gt;So the above does the fancy conversion of a number to a string and you just whip a - in it.&amp;nbsp; In python 3.6, the format thing is replaced with a much simpler version, but you are some time away from being able to use it in Arc&lt;/P&gt;&lt;P&gt;Coming up ... to a python hopefully soon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; f&lt;SPAN class="string token"&gt;"{txt}-{site}"&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# python 3.6 and 3.7&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;'JCB-194'&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:01:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-solutions-questions/generate-point-names-based-on-existing-attribute/m-p/226440#M281</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T11:01:56Z</dc:date>
    </item>
  </channel>
</rss>

