<?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 Calculator Combining Fields in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646909#M21619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Good day all,&lt;BR /&gt;&lt;BR /&gt;I've got a question about the field calculator. I would like to combine several fields together in one, new field. (Street name, House number, Extension, Postal Code and Place). So my code looks like this (the fieldsname are in Dutch)&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;[Straatnaam]&amp;amp;" "&amp;amp;[Huisnummer]&amp;amp;[Huisletter]&amp;amp;" "&amp;amp;[Postcode]&amp;amp;" "&amp;amp;[Woonplaats]&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;After a couple of minutes, I get the result in my newly created field. However, not every streetname has a extension (Huisletter) and is left 'blank' in its original field, which results in an extra space in my newly created field. &lt;BR /&gt;How do I modify my code to include the number, but exclude the 'blank' cells?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the easy way to do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;[Straatnaam] &amp;amp; " " &amp;amp; Trim([Huisnummer] &amp;amp; [Huisletter]) &amp;amp; " " &amp;amp; [Postcode] &amp;amp; " " &amp;amp; [Woonplaats]&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Aug 2013 11:41:19 GMT</pubDate>
    <dc:creator>RichardFairhurst</dc:creator>
    <dc:date>2013-08-06T11:41:19Z</dc:date>
    <item>
      <title>Field Calculator Combining Fields</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646907#M21617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: M.P.N.Mark_RUG&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good day all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got a question about the field calculator. I would like to combine several fields together in one, new field. (Street name, House number, Extension, Postal Code and Place). So my code looks like this (the fieldsname are in Dutch)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;[Straatnaam]&amp;amp;" "&amp;amp;[Huisnummer]&amp;amp;[Huisletter]&amp;amp;" "&amp;amp;[Postcode]&amp;amp;" "&amp;amp;[Woonplaats]&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After a couple of minutes, I get the result in my newly created field. However, not every streetname has a extension (Huisletter) and is left 'blank' in its original field, which results in an extra space in my newly created field. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I modify my code to include the number, but exclude the 'blank' cells?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 09:18:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646907#M21617</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-08-06T09:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator Combining Fields</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646908#M21618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: mdenil&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems that Huisletter sometimes contains a space character instead of an empty string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A true empty string would not add space to your concatenated string&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In your pre-logic block, test Huisletter for a single space&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If it is a space set a variable to an empty string&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if Huisletter is anything else, assume it is the actual Huisletter, and set the variable to the Huisletter value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;now build your concatenated string using the variable instead of Huisletter.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 11:27:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646908#M21618</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-08-06T11:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator Combining Fields</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646909#M21619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Good day all,&lt;BR /&gt;&lt;BR /&gt;I've got a question about the field calculator. I would like to combine several fields together in one, new field. (Street name, House number, Extension, Postal Code and Place). So my code looks like this (the fieldsname are in Dutch)&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;[Straatnaam]&amp;amp;" "&amp;amp;[Huisnummer]&amp;amp;[Huisletter]&amp;amp;" "&amp;amp;[Postcode]&amp;amp;" "&amp;amp;[Woonplaats]&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;After a couple of minutes, I get the result in my newly created field. However, not every streetname has a extension (Huisletter) and is left 'blank' in its original field, which results in an extra space in my newly created field. &lt;BR /&gt;How do I modify my code to include the number, but exclude the 'blank' cells?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the easy way to do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;[Straatnaam] &amp;amp; " " &amp;amp; Trim([Huisnummer] &amp;amp; [Huisletter]) &amp;amp; " " &amp;amp; [Postcode] &amp;amp; " " &amp;amp; [Woonplaats]&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 11:41:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646909#M21619</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-08-06T11:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator Combining Fields</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646910#M21620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: dmhoneycutt&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For everyone's future reference, there's a blog post about combining (concatenating) fields: &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2010/08/30/concatenate/"&gt;Concatenating field values using Calculate Field&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 21:19:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646910#M21620</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-08-06T21:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator Combining Fields</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646911#M21621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Here is the easy way to do it.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[Straatnaam] &amp;amp; " " &amp;amp; &lt;SPAN style="font-size:3;"&gt;&lt;STRONG&gt;Trim(&lt;/STRONG&gt;&lt;/SPAN&gt;[Huisnummer] &amp;amp; [Huisletter]&lt;SPAN style="font-size:3;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt; &amp;amp; " " &amp;amp; [Postcode] &amp;amp; " " &amp;amp; [Woonplaats]&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it's even easier in Python. I am probably biased though...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;"{0} {1} {2} {3}".format(
&amp;nbsp; !Straatnaam!, (!Huisnummer! + !Huisletter!).strip(), !Postcode!, !Woonplaats!)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:27:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646911#M21621</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-12T03:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculator Combining Fields</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646912#M21622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: M.P.N.Mark_RUG&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Here is the easy way to do it.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;[Straatnaam] &amp;amp; " " &amp;amp; &lt;SPAN style="font-size:3;"&gt;&lt;STRONG&gt;Trim(&lt;/STRONG&gt;&lt;/SPAN&gt;[Huisnummer] &amp;amp; [Huisletter]&lt;SPAN style="font-size:3;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt; &amp;amp; " " &amp;amp; [Postcode] &amp;amp; " " &amp;amp; [Woonplaats]&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, sometimes the easiest way is the best way. I forgot about adding the trim function. Thank you very much. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also PMdmhoneycutt, thank you for that blog. I saw some excellent stuff there.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 07:36:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/field-calculator-combining-fields/m-p/646912#M21622</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-08-12T07:36:47Z</dc:date>
    </item>
  </channel>
</rss>

