<?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 calculate expression - Unknown Error in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-calculate-expression-unknown-error/m-p/1332098#M7079</link>
    <description>&lt;P&gt;It should work based on the documentation.&lt;BR /&gt;&lt;BR /&gt;The field calculate &lt;A href="https://developers.arcgis.com/arcade/profiles/field-calculation/" target="_self"&gt;Arcade Profile&lt;/A&gt;&amp;nbsp;lists "Portal Access" as one of its function bundles.&amp;nbsp; The &lt;A href="https://developers.arcgis.com/arcade/function-reference/portal_functions/#featuresetbyportalitem" target="_self"&gt;FeatureSetByPortalItem&lt;/A&gt;&amp;nbsp;function is a member of the "Portal Access" function bundle. This function has been around since Arcade 1.8 and ArcGIS Pro 2.4.&lt;BR /&gt;&lt;BR /&gt;The error you specify above seems to suggest that you are not pointing to the correct portal or it is having issues authenticating.&amp;nbsp; I don't really use model builder but you may need to sign-in to the portal of interest in the model...&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/setting-a-portal-connection-in-modelbuilder-in/td-p/1142868" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-pro-questions/setting-a-portal-connection-in-modelbuilder-in/td-p/1142868&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2023 18:44:56 GMT</pubDate>
    <dc:creator>JustinReynolds</dc:creator>
    <dc:date>2023-09-25T18:44:56Z</dc:date>
    <item>
      <title>arcade calculate expression - Unknown Error</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-calculate-expression-unknown-error/m-p/1326757#M6962</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I created a field maps app several months ago that includes an arcade expression to calculate the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;DueDate&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;field for features that are added to the app. I used the&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;FeatureSetByName($map...)&lt;/U&gt;&lt;SPAN&gt;&amp;nbsp;function to access attributes in a&amp;nbsp;static road feature service (i.e. a copy of our roads feature layer). Recently, someone in my organization added a new roads feature service that reflects our 'live' data i.e. it updates as features are edited in our SDE geodatabase. This layer was added to portal and the portal item was added to ArcGIS Online with stored credentials. When I try to reference the new layer in my expression I receive the following error:&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Test execution error: Unknown Error. Verify test data.&amp;nbsp;&lt;/STRONG&gt;I have also tried to use the &lt;U&gt;FeaturesetByPortalItem&lt;/U&gt; function and receive this error:&amp;nbsp;&lt;STRONG&gt;Test exection error: Invalid variable assignment..&amp;nbsp; Verify test data.&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Does anyone know why I cannot use the same expression to access attributes in the 'live' roads feature service?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 15:13:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-calculate-expression-unknown-error/m-p/1326757#M6962</guid>
      <dc:creator>SarahRijneke</dc:creator>
      <dc:date>2023-09-08T15:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: arcade calculate expression - Unknown Error</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-calculate-expression-unknown-error/m-p/1326949#M6969</link>
      <description>&lt;P&gt;Is it a feature service or map service (I'm guessing you're trying this on a map service)?&amp;nbsp; have you tried FeatureSetByPortalItem()?&amp;nbsp; What does the url look like for this 'live' item.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 19:01:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-calculate-expression-unknown-error/m-p/1326949#M6969</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-09-08T19:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: arcade calculate expression - Unknown Error</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-calculate-expression-unknown-error/m-p/1327228#M6974</link>
      <description>&lt;P&gt;the info I am tryin to access is from a Feature layer. I also tried FeatureSetByPortalItem and get the following error:&amp;nbsp;&lt;STRONG&gt;Test execution error: Unknown Error. Verify test data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SarahRijneke_0-1694434445784.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80296i014313D921EDF414/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SarahRijneke_0-1694434445784.png" alt="SarahRijneke_0-1694434445784.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SarahRijneke_1-1694434459425.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80297i792EB5C9B28543C3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SarahRijneke_1-1694434459425.png" alt="SarahRijneke_1-1694434459425.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 12:14:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-calculate-expression-unknown-error/m-p/1327228#M6974</guid>
      <dc:creator>SarahRijneke</dc:creator>
      <dc:date>2023-09-11T12:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: arcade calculate expression - Unknown Error</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-calculate-expression-unknown-error/m-p/1332036#M7076</link>
      <description>&lt;P&gt;The arcade expression works in field maps now using&amp;nbsp;&lt;EM&gt;FeatureSetByName($map...)&lt;/EM&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a model in ArcGIS pro that connects to the same datasets. The model calculates the DueDate field in a similar way and I would like it to reference this new feature service as well. When I use the&amp;nbsp;&lt;EM&gt;FeatureSetByPortalItem&lt;/EM&gt; function I see an&amp;nbsp;&lt;STRONG&gt;Invalid expression. Portal item not found &lt;/STRONG&gt;error. Is it possible to use a portal items to calculate fields for features that are stored in a geodatabase?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 15:52:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-calculate-expression-unknown-error/m-p/1332036#M7076</guid>
      <dc:creator>SarahRijneke</dc:creator>
      <dc:date>2023-09-25T15:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: arcade calculate expression - Unknown Error</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-calculate-expression-unknown-error/m-p/1332098#M7079</link>
      <description>&lt;P&gt;It should work based on the documentation.&lt;BR /&gt;&lt;BR /&gt;The field calculate &lt;A href="https://developers.arcgis.com/arcade/profiles/field-calculation/" target="_self"&gt;Arcade Profile&lt;/A&gt;&amp;nbsp;lists "Portal Access" as one of its function bundles.&amp;nbsp; The &lt;A href="https://developers.arcgis.com/arcade/function-reference/portal_functions/#featuresetbyportalitem" target="_self"&gt;FeatureSetByPortalItem&lt;/A&gt;&amp;nbsp;function is a member of the "Portal Access" function bundle. This function has been around since Arcade 1.8 and ArcGIS Pro 2.4.&lt;BR /&gt;&lt;BR /&gt;The error you specify above seems to suggest that you are not pointing to the correct portal or it is having issues authenticating.&amp;nbsp; I don't really use model builder but you may need to sign-in to the portal of interest in the model...&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/setting-a-portal-connection-in-modelbuilder-in/td-p/1142868" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-pro-questions/setting-a-portal-connection-in-modelbuilder-in/td-p/1142868&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 18:44:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/arcade-calculate-expression-unknown-error/m-p/1332098#M7079</guid>
      <dc:creator>JustinReynolds</dc:creator>
      <dc:date>2023-09-25T18:44:56Z</dc:date>
    </item>
  </channel>
</rss>

