<?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 Error: Dictionary Type Expected in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-error-dictionary-type-expected/m-p/79745#M3371</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/36454" target="_blank"&gt;Josh Saad&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;don't think it is&amp;nbsp;what is causing the error, but the line:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var fsBuilding = FeatureSetByName($datastore, "BuildingFootprint", ["bldngid"]

&lt;/PRE&gt;&lt;P&gt;... is missing a bracket at the end of the line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also notice that you don't check if the Intersects is returning any results. In theory it could result a featureset with 0 features and when you apply First on that, this would cause an error (although I think a different one).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you are using the exact names of how these items are named in your FGBD ($datastore), right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried with writing messages to the Console on which line this error is occurring and to check that the items used are valid and the expression has access to them?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 23:04:45 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2021-12-10T23:04:45Z</dc:date>
    <item>
      <title>Arcade Error: Dictionary Type Expected</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-error-dictionary-type-expected/m-p/79744#M3370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote an Arcade expression to calculate the zip code of an address point from its intersecting zip code polygon, and it works just fine:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var fsZip = FeatureSetByName($datastore, "ZipCodes", ["Zip_Code"])
var fsZipIntersect = Intersects(fsZip, $feature)
var zip = First(fsZipIntersect)

return zip.Zip_Code&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I use a similar expression to calculate the municipality from the zip codes feature class with no problems:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var fsZip = FeatureSetByName($datastore, "ZipCodes", ["PO_NAME"])
var fsZipIntersect = Intersects(fsZip, $feature)
var city = First(fsZipIntersect)

return city.PO_NAME&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;But when I try to do essentially the same process to calculate the intersecting neighborhood or building footprint I get an error, "&lt;STRONG&gt;Dictionary Type Expected&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var fsBuilding = FeatureSetByName($datastore, "BuildingFootprint", ["bldngid"]
var fsBuildingIntersect = Intersects(fsBuilding, $feature)
var Building = First(fsBuildingIntersect)

return Building.bldngid&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var fsNeighborhood = FeatureSetByName($datastore, "Neighborhood", ["nbrhdid"])
var fsNeighborhoodIntersect = Intersects(fsNeighborhood, $feature)
var Neighborhood = First(fsNeighborhoodIntersect)

return Neighborhood.nbrhdid&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;All of my feature classes are in the same file geodatabase that I'm using for testing, so they're all in the same data store.&amp;nbsp;&amp;nbsp;Does anyone know why this might be happening?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 15:59:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-error-dictionary-type-expected/m-p/79744#M3370</guid>
      <dc:creator>JoshSaad1</dc:creator>
      <dc:date>2021-12-12T15:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Error: Dictionary Type Expected</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-error-dictionary-type-expected/m-p/79745#M3371</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/36454" target="_blank"&gt;Josh Saad&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;don't think it is&amp;nbsp;what is causing the error, but the line:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var fsBuilding = FeatureSetByName($datastore, "BuildingFootprint", ["bldngid"]

&lt;/PRE&gt;&lt;P&gt;... is missing a bracket at the end of the line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also notice that you don't check if the Intersects is returning any results. In theory it could result a featureset with 0 features and when you apply First on that, this would cause an error (although I think a different one).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you are using the exact names of how these items are named in your FGBD ($datastore), right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried with writing messages to the Console on which line this error is occurring and to check that the items used are valid and the expression has access to them?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:04:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-error-dictionary-type-expected/m-p/79745#M3371</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-10T23:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Error: Dictionary Type Expected</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-error-dictionary-type-expected/m-p/79746#M3372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; I looked into it and resolved the issue by adding the following lines to my expressions (with different variables in each respectively):&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;if (Building == null) return null&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2020 01:02:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-error-dictionary-type-expected/m-p/79746#M3372</guid>
      <dc:creator>JoshSaad1</dc:creator>
      <dc:date>2020-04-30T01:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Error: Dictionary Type Expected</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-error-dictionary-type-expected/m-p/1004731#M34543</link>
      <description>&lt;P&gt;Hey Xander,&lt;/P&gt;&lt;P&gt;I am also having an issue in ArcGIS Pro with the dictionary type when saving this attribute rule expression that deletes the corresponding Tag ID in the master tag table:&lt;/P&gt;&lt;P&gt;var aTable = $feature["AGLDESCRIPTION"];&lt;BR /&gt;var bTable = FeatureSetByName($datastore,"Tags");&lt;BR /&gt;var relate = "name = '" + $feature.AGLDESCRIPTION + "'";&lt;BR /&gt;var match = Filter(bTable, relate);&lt;BR /&gt;var cnt = Count(match);&lt;BR /&gt;if (count(match) == 0) return $feature.AGLDESCRIPTION;&lt;BR /&gt;var matchfeature = first(match)&lt;BR /&gt;return {&lt;BR /&gt;//we want to just return the value of field `AGLDESCRIPTION` no change require&lt;BR /&gt;"result": $feature.AGLDESCRIPTION,&lt;BR /&gt;//this keyword indicates an edit that need to happen, its an array since we can make many edits&lt;BR /&gt;"edit": [&lt;BR /&gt;{&lt;BR /&gt;//the other class we want to edit&lt;BR /&gt;"className" : "Tags",&lt;BR /&gt;//the type of edit, in this case we want to delete so we say `deletes`, its an array since we can make many deletes&lt;BR /&gt;"deletes" : [&lt;BR /&gt;{&lt;BR /&gt;//what feature we need to delete?&lt;BR /&gt;"globalID" : bTable.GlobalID&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 17:19:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-error-dictionary-type-expected/m-p/1004731#M34543</guid>
      <dc:creator>CollinHorace</dc:creator>
      <dc:date>2020-11-25T17:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Error: Dictionary Type Expected</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-error-dictionary-type-expected/m-p/1299327#M70236</link>
      <description>&lt;P&gt;Thanks Josh. I had also run into a similar situation (when using the FeatureSetbyName function, Intersect function, and First function, and received the &lt;STRONG&gt;Dictionary Type Expected &lt;/STRONG&gt;error message) and a similar solution worked for me. I did:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if (x == null){&lt;BR /&gt;&lt;/STRONG&gt;&lt;STRONG&gt;return null&lt;BR /&gt;}&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 18:09:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-error-dictionary-type-expected/m-p/1299327#M70236</guid>
      <dc:creator>Tiffany_Chau</dc:creator>
      <dc:date>2023-06-14T18:09:25Z</dc:date>
    </item>
  </channel>
</rss>

