<?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 in map viewer error - unique ID in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcade-in-map-viewer-error-unique-id/m-p/1383653#M14632</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Ensure your FeatureSetByName function call is syntactically correct. You are missing a comma before the false&lt;BR /&gt;parameter. Also,&amp;nbsp;It's good practice to include some form of error handling or checking to ensure that your script can handle unexpected situations , such as when there are no features in the feature set.&lt;/P&gt;</description>
    <pubDate>Fri, 16 Feb 2024 21:34:11 GMT</pubDate>
    <dc:creator>Omar_A</dc:creator>
    <dc:date>2024-02-16T21:34:11Z</dc:date>
    <item>
      <title>Arcade in map viewer error - unique ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcade-in-map-viewer-error-unique-id/m-p/1383626#M14630</link>
      <description>&lt;P&gt;I am trying to create arcade for my TREE ID. I have some IDs currently, but would like it to auto calculate a new ID that comes next in line when another record is creating. My code does not have an output. Any ideas?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;fset&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$map&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Tree Inventory'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;S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/SPAN&gt;&lt;SPAN&gt;1&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;$originalFeature&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;'TREEID'&lt;/SPAN&gt;&lt;SPAN&gt;} &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;0&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;return&lt;/SPAN&gt; &lt;SPAN&gt;$originalFeature&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;'TREEID'&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;else&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;return&lt;/SPAN&gt; &lt;SPAN&gt;newID&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&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;This arcade is copied from a CloudPoint Geospatial video.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 20 Feb 2024 14:05:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcade-in-map-viewer-error-unique-id/m-p/1383626#M14630</guid>
      <dc:creator>Laura</dc:creator>
      <dc:date>2024-02-20T14:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade in map viewer error - unique ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcade-in-map-viewer-error-unique-id/m-p/1383653#M14632</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Ensure your FeatureSetByName function call is syntactically correct. You are missing a comma before the false&lt;BR /&gt;parameter. Also,&amp;nbsp;It's good practice to include some form of error handling or checking to ensure that your script can handle unexpected situations , such as when there are no features in the feature set.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 21:34:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcade-in-map-viewer-error-unique-id/m-p/1383653#M14632</guid>
      <dc:creator>Omar_A</dc:creator>
      <dc:date>2024-02-16T21:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade in map viewer error - unique ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcade-in-map-viewer-error-unique-id/m-p/1383690#M14633</link>
      <description>&lt;P&gt;Dear Laura,&lt;/P&gt;&lt;P&gt;I think if you want to access a field of a Feature you should use one of these ways:&lt;/P&gt;&lt;P&gt;1) $Feature.fieldname&lt;/P&gt;&lt;P&gt;2) $Feature['fieldname']&lt;/P&gt;&lt;P&gt;and I am not surehere you can use $originalFeature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 23:21:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcade-in-map-viewer-error-unique-id/m-p/1383690#M14633</guid>
      <dc:creator>Amir-Sarrafzadeh-Arasi</dc:creator>
      <dc:date>2024-02-16T23:21:26Z</dc:date>
    </item>
  </channel>
</rss>

