<?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: Arcade Script for Populating the Full Street Name using Attribute Rules in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-for-populating-the-full-street-name/m-p/1512918#M86241</link>
    <description>&lt;P&gt;Thanks for letting me know this didn't work perfectly (I also mocked up your data, tried it, and got the same result). For now, instead of &lt;SPAN&gt;&lt;STRONG&gt;return fullName&lt;/STRONG&gt; you can do &lt;STRONG&gt;return &lt;A href="https://developers.arcgis.com/arcade/function-reference/text_functions/#trim" target="_blank" rel="noopener"&gt;Trim&lt;/A&gt;(fullName)&lt;/STRONG&gt;. This will remove spaces at the beginning and end of your string. You can also remove the empty single quotes from &lt;STRONG&gt;var fullName = ''&lt;/STRONG&gt;, to just be &lt;FONT color="#000000"&gt;&lt;STRONG&gt;var fullName&lt;/STRONG&gt; (i.e., you don't have to give any hint of what the variable is going to store until you actually use it--something I learned today).&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Edit:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;of course as soon as I hit post, I realize what the error is, and it's SO simple. For the Cane Creek record, imagine you're going through field by field evaluating whether the value is null or not. All are null until you hit street name, and since that returns true, it's going to go to the second line of that If statement, and return a space followed by the street name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, instead, add the spaces &lt;EM&gt;after&lt;/EM&gt; the field value:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var fullName&lt;/P&gt;&lt;P&gt;if(IsEmpty($feature.st_premod)==false){&lt;BR /&gt;fullName += $feature.st_premod + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_predir)==false){&lt;BR /&gt;fullName += $feature.st_predir + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_pretyp)==false){&lt;BR /&gt;fullName += $feature.st_pretyp + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_presep)==false){&lt;BR /&gt;fullName += $feature.st_presep + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_name)==false){&lt;BR /&gt;fullName += $feature.st_name + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_postyp)==false){&lt;BR /&gt;fullName += $feature.st_postyp + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_posdir)==false){&lt;BR /&gt;fullName += $feature.st_posdir + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_posmod)==false){&lt;BR /&gt;fullName += $feature.st_posmod&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return fullName&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jul 2024 13:48:55 GMT</pubDate>
    <dc:creator>NicoleJohnson</dc:creator>
    <dc:date>2024-07-31T13:48:55Z</dc:date>
    <item>
      <title>Arcade Script for Populating the Full Street Name using Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-for-populating-the-full-street-name/m-p/1510789#M86063</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;Forgive my incompetence here. But I can't write complex script in arcade. Your help is really appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is anyone can help or has a script in populating the full street name with the NENA schema? Some of the fields are empty (or/ Null), so I don't how to remove the extra space when concatenating all the fields using the attribute rules.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nidz4evr_0-1722018205346.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110781iC5FEC1CD008293E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nidz4evr_0-1722018205346.png" alt="nidz4evr_0-1722018205346.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 18:32:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-for-populating-the-full-street-name/m-p/1510789#M86063</guid>
      <dc:creator>nidz4evr</dc:creator>
      <dc:date>2024-07-26T18:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script for Populating the Full Street Name using Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-for-populating-the-full-street-name/m-p/1510815#M86069</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;One way to do this very simply is to just check whether the field is null, and if it isn't, add it to a string that you build over the different fields.&lt;/P&gt;&lt;P&gt;Something like this (replace with your field names):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;fullName&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;IsEmpty&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;NAME&lt;/SPAN&gt;&lt;SPAN&gt;)==&lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;fullName&lt;/SPAN&gt;&lt;SPAN&gt; += &lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;NAME&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;IsEmpty&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;FETYPE&lt;/SPAN&gt;&lt;SPAN&gt;)==&lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;fullName&lt;/SPAN&gt;&lt;SPAN&gt; += &lt;/SPAN&gt;&lt;SPAN&gt;" "&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;FETYPE&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;fullName&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/logical_functions/#isempty" target="_blank"&gt;Logical functions | ArcGIS Arcade | Esri Developer&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Jul 2024 19:12:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-for-populating-the-full-street-name/m-p/1510815#M86069</guid>
      <dc:creator>NicoleJohnson</dc:creator>
      <dc:date>2024-07-26T19:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script for Populating the Full Street Name using Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-for-populating-the-full-street-name/m-p/1512455#M86200</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/606665"&gt;@NicoleJohnson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your respond. Thank you very much. And it really works. However, I noticed that there is one space before the value, if the first field '$feature.st_premod' is null, as shown in the screenshot below with red line. But with value, its perfect. And I can't figure out how to remove that space.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nidz4evr_1-1722358020070.png" style="width: 758px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/111107iE86BF97BF3607C20/image-dimensions/758x36?v=v2" width="758" height="36" role="button" title="nidz4evr_1-1722358020070.png" alt="nidz4evr_1-1722358020070.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Your additional input is very much appreciated on how to remove the space with my current syntax?&amp;nbsp;&lt;/P&gt;&lt;P&gt;var fullName = ''&lt;/P&gt;&lt;P&gt;if(IsEmpty($feature.st_premod)==false){&lt;BR /&gt;fullName += $feature.st_premod&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if(IsEmpty($feature.st_predir)==false){&lt;BR /&gt;fullName += " " + $feature.st_predir&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_pretyp)==false){&lt;BR /&gt;fullName += " " + $feature.st_pretyp&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_presep)==false){&lt;BR /&gt;fullName += " " + $feature.st_presep&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_name)==false){&lt;BR /&gt;fullName += " " + $feature.st_name&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_postyp)==false){&lt;BR /&gt;fullName += " " + $feature.st_postyp&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_posdir)==false){&lt;BR /&gt;fullName += " " + $feature.st_posdir&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_posmod)==false){&lt;BR /&gt;fullName += " " + $feature.st_posmod&lt;BR /&gt;}&lt;BR /&gt;return fullName&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2024 16:50:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-for-populating-the-full-street-name/m-p/1512455#M86200</guid>
      <dc:creator>nidz4evr</dc:creator>
      <dc:date>2024-07-30T16:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script for Populating the Full Street Name using Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-for-populating-the-full-street-name/m-p/1512918#M86241</link>
      <description>&lt;P&gt;Thanks for letting me know this didn't work perfectly (I also mocked up your data, tried it, and got the same result). For now, instead of &lt;SPAN&gt;&lt;STRONG&gt;return fullName&lt;/STRONG&gt; you can do &lt;STRONG&gt;return &lt;A href="https://developers.arcgis.com/arcade/function-reference/text_functions/#trim" target="_blank" rel="noopener"&gt;Trim&lt;/A&gt;(fullName)&lt;/STRONG&gt;. This will remove spaces at the beginning and end of your string. You can also remove the empty single quotes from &lt;STRONG&gt;var fullName = ''&lt;/STRONG&gt;, to just be &lt;FONT color="#000000"&gt;&lt;STRONG&gt;var fullName&lt;/STRONG&gt; (i.e., you don't have to give any hint of what the variable is going to store until you actually use it--something I learned today).&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Edit:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;of course as soon as I hit post, I realize what the error is, and it's SO simple. For the Cane Creek record, imagine you're going through field by field evaluating whether the value is null or not. All are null until you hit street name, and since that returns true, it's going to go to the second line of that If statement, and return a space followed by the street name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, instead, add the spaces &lt;EM&gt;after&lt;/EM&gt; the field value:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var fullName&lt;/P&gt;&lt;P&gt;if(IsEmpty($feature.st_premod)==false){&lt;BR /&gt;fullName += $feature.st_premod + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_predir)==false){&lt;BR /&gt;fullName += $feature.st_predir + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_pretyp)==false){&lt;BR /&gt;fullName += $feature.st_pretyp + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_presep)==false){&lt;BR /&gt;fullName += $feature.st_presep + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_name)==false){&lt;BR /&gt;fullName += $feature.st_name + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_postyp)==false){&lt;BR /&gt;fullName += $feature.st_postyp + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_posdir)==false){&lt;BR /&gt;fullName += $feature.st_posdir + " "&lt;BR /&gt;}&lt;BR /&gt;if(IsEmpty($feature.st_posmod)==false){&lt;BR /&gt;fullName += $feature.st_posmod&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return fullName&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 13:48:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-for-populating-the-full-street-name/m-p/1512918#M86241</guid>
      <dc:creator>NicoleJohnson</dc:creator>
      <dc:date>2024-07-31T13:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script for Populating the Full Street Name using Attribute Rules</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-for-populating-the-full-street-name/m-p/1513090#M86262</link>
      <description>&lt;P&gt;You're awesome! Thank you very much&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/606665"&gt;@NicoleJohnson&lt;/a&gt;&amp;nbsp; and thank you for sharing your knowledge. Have a great day!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 18:20:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-for-populating-the-full-street-name/m-p/1513090#M86262</guid>
      <dc:creator>nidz4evr</dc:creator>
      <dc:date>2024-07-31T18:20:52Z</dc:date>
    </item>
  </channel>
</rss>

