<?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: Create an array out of a string using Arcade? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/create-an-array-out-of-a-string-using-arcade/m-p/109040#M4416</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does the string from the field look like? Is it something like "2, 2"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Aug 2020 21:58:10 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2020-08-10T21:58:10Z</dc:date>
    <item>
      <title>Create an array out of a string using Arcade?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-an-array-out-of-a-string-using-arcade/m-p/109039#M4415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I hard code in an array...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var array &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;... right into the expression, it works.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I add that same array into a field, then call that field instead within the function, it doesn't see it as an array.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$feature.array =&amp;nbsp;["2", "2"]‍‍&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var array = $feature.array

&lt;SPAN class="line-numbers-rows"&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;Is there a way to call a string from a field and have the expression read it as a array?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3100" target="_blank"&gt;Xander Bakker&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:33:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-an-array-out-of-a-string-using-arcade/m-p/109039#M4415</guid>
      <dc:creator>TL2</dc:creator>
      <dc:date>2021-12-11T06:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create an array out of a string using Arcade?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-an-array-out-of-a-string-using-arcade/m-p/109040#M4416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does the string from the field look like? Is it something like "2, 2"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2020 21:58:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-an-array-out-of-a-string-using-arcade/m-p/109040#M4416</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-08-10T21:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create an array out of a string using Arcade?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/create-an-array-out-of-a-string-using-arcade/m-p/109041#M4417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/166222"&gt;T L&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have a feature with a field called array (probably a text field) and&amp;nbsp;you edit the field to type in&amp;nbsp;["2", "2"], it will not be an array. As &lt;A href="https://community.esri.com/migrated-users/3420"&gt;Joshua Bixby&lt;/A&gt;&amp;nbsp;asked, if you would put the text "2,2" (without the quotes) in a field, you could use the Split function to split the text up and create the array:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/502936_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you click on a "2" in the result, you will see that each element is in fact a string:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/502979_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2020 22:43:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/create-an-array-out-of-a-string-using-arcade/m-p/109041#M4417</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-08-10T22:43:23Z</dc:date>
    </item>
  </channel>
</rss>

