<?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: Field Maps Arcade - FeatureSetByPortalItem - Failed to calculate (Object failed to load, unable to execute task) in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1512380#M60581</link>
    <description>&lt;P&gt;I was hopeful but doesn't work for me.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2024 14:59:15 GMT</pubDate>
    <dc:creator>mikaël</dc:creator>
    <dc:date>2024-07-30T14:59:15Z</dc:date>
    <item>
      <title>Field Maps Arcade - FeatureSetByPortalItem - Failed to calculate (Object failed to load, unable to execute task)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1235002#M49022</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have created a Arcade Expression for Field Calculation in Field Maps to autopopulate the address.&lt;/P&gt;&lt;P&gt;Im using&amp;nbsp;&lt;STRONG&gt;FeatureSetByPortalItem&lt;/STRONG&gt; to get featureSet from a public Norwegian Address service (called Matrikkel) and I'm getting the closest address.&lt;/P&gt;&lt;P&gt;Im currently on a ArcGIS portal:&amp;nbsp;&lt;A href="https://kraftnett.maps.arcgis.com/" target="_blank" rel="noopener"&gt;https://kraftnett.maps.arcgis.com/&lt;/A&gt; and Field Maps App v. 22.4.0 and iOS 16.1.1&lt;/P&gt;&lt;P&gt;When I test the expression in the Field Maps Expression builder I get the correct result.&lt;/P&gt;&lt;P&gt;When I use Map Viewer to submit a SmartForm it also work and gives me the correct result.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when I try to submit the form in the Field Maps Mobile App I get the error message &lt;/SPAN&gt;&lt;STRONG&gt;failed to calculate&lt;/STRONG&gt;, &lt;STRONG&gt;and&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;The Field Maps log gives me this error message&lt;/STRONG&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;28/11/2022, 14:22 Expression failed to evaluate:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name: expr/getclosestaddress0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error: Error Domain=com.esri.arcgis.runtime.error Code=15 "Invalid call." UserInfo={NSLocalizedFailureReason=Object failed to load, unable to execute task., NSLocalizedDescription=Invalid call., Additional Message=Object failed to load, unable to execute task.}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Does Field Maps Field autofilling support the&amp;nbsp;&lt;STRONG&gt;FeatureSetByPortalItem&lt;/STRONG&gt; function?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ArcadeEditor gives me correct result:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArcadeEditor ok.png" style="width: 575px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56843i676F3603248AE0AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="ArcadeEditor ok.png" alt="ArcadeEditor ok.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SmartForm in Map Viewer gives me correct result:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Arcade MapViewer ok.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56845i8215BCFC97A7700F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Arcade MapViewer ok.png" alt="Arcade MapViewer ok.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Field Maps Mobile App gives&amp;nbsp;error message &lt;U&gt;failed to calculate&lt;/U&gt;:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;There is no problem in getting the location in the form.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Arcade FieldMaps not ok.jpg" style="width: 496px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56847iB61381E9E9E4F291/image-size/large?v=v2&amp;amp;px=999" role="button" title="Arcade FieldMaps not ok.jpg" alt="Arcade FieldMaps not ok.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Field Maps log gives me this error message:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;28/11/2022, 14:22 Expression failed to evaluate:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name: expr/getclosestaddress0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error: Error Domain=com.esri.arcgis.runtime.error Code=15 "Invalid call." UserInfo={NSLocalizedFailureReason=Object failed to load, unable to execute task., NSLocalizedDescription=Invalid call., Additional Message=Object failed to load, unable to execute task.}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im using this expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//GetClosestAddress
//Date || User || Version || Description
//25.11.2022 || LAROST || v1 || Arcade created
//SourceName: Matrikkel (Oversikt)
//Source URL: https://www.arcgis.com/home/item.html?id=ce048cc436d247afab84f0983af371c8
//LayerId: 0. AdressePunkt (PointLayer)
//LayerId: 5. DekTeigFlate (PolygonLayer)
var searchDist = 200;
var matrikkel = FeatureSetByPortalItem(Portal('https://www.arcgis.com'),'ce048cc436d247afab84f0983af371c8',5,['*'],true);
//var matrikkel = FeatureSetById($map, "GeomapMatrikkel - DekTeigFlate")

Console("Total number of addresses in Matrikkel:" + Count(matrikkel));

var addresses = Intersects(matrikkel, Buffer($feature, searchDist, "meters"));
var cnt = Count(addresses)
Console("Total Number of addresses within buffer:" + cnt);

if (cnt &amp;gt; 0) {
    var nearestaddress;
    var min_dist = 250;
        for (var f in addresses){
        var addressDist = Round(Distance(f, $feature, "meters"),2);
        if (addressDist &amp;lt; min_dist) {
            nearestaddress = f.ADRESSE + ", " + f.POSTNR + " " + f.POSTNAVN;
            min_dist = addressDist;
}
Console(f.ADRESSE + ", " + f.POSTNR + " " + f.POSTNAVN + ": " + " " + addressDist + "m away");

}
return nearestaddress;

} else {
    // no features found in buffer
    return "N/A"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used some of this information.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-find-the-nearest-address-point/td-p/108741" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-online-questions/using-arcade-to-find-the-nearest-address-point/td-p/108741&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me with this? Appreciate all help I can get&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;?&amp;nbsp;@Anonymous User?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 18:07:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1235002#M49022</guid>
      <dc:creator>LarsChristianØstgaard</dc:creator>
      <dc:date>2022-11-28T18:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps Arcade - FeatureSetByPortalItem - Failed to calculate (Object failed to load, unable to execute task)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1249626#M49865</link>
      <description>&lt;P&gt;I am having the same issue on my end. Hopefully someone from ESRI can respond soon!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 18:55:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1249626#M49865</guid>
      <dc:creator>hgnudas</dc:creator>
      <dc:date>2023-01-19T18:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps Arcade - FeatureSetByPortalItem - Failed to calculate (Object failed to load, unable to execute task)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1251542#M49967</link>
      <description>&lt;P&gt;Im receiving the same error when trying to Navigate to a point&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 19:52:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1251542#M49967</guid>
      <dc:creator>CarlosHenderson</dc:creator>
      <dc:date>2023-01-25T19:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps Arcade - FeatureSetByPortalItem - Failed to calculate (Object failed to load, unable to execute task)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1275948#M51314</link>
      <description>&lt;P&gt;I am having the exact same issue, but only on iOS. Looks like you're using iOS as well. Have you tested on Android to see if you get the same error? It works for me on Android but not iOS.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 19:22:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1275948#M51314</guid>
      <dc:creator>JoeEastman1</dc:creator>
      <dc:date>2023-04-05T19:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps Arcade - FeatureSetByPortalItem - Failed to calculate (Object failed to load, unable to execute task)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1331829#M54719</link>
      <description>&lt;P&gt;Has this been resolved? I am experiencing the same issue&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 11:31:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1331829#M54719</guid>
      <dc:creator>MeghanBlair</dc:creator>
      <dc:date>2023-09-24T11:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps Arcade - FeatureSetByPortalItem - Failed to calculate (Object failed to load, unable to execute task)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1342277#M55353</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/526533"&gt;@MeghanBlair&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/667667"&gt;@JoeEastman1&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/652798"&gt;@CarlosHenderson&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/643825"&gt;@hgnudas&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/598712"&gt;@LarsChristianØstgaard&lt;/a&gt;&amp;nbsp; I am now having this same issue.&amp;nbsp; Anybody find out a workaround?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 19:40:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1342277#M55353</guid>
      <dc:creator>ArmstKP</dc:creator>
      <dc:date>2023-10-26T19:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps Arcade - FeatureSetByPortalItem - Failed to calculate (Object failed to load, unable to execute task)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1342334#M55358</link>
      <description>&lt;P&gt;From my experience with Field Maps- calling a feature by PortalID or PortalName doesn't work. You have to use $map or $feature. I haven't been able to find documentation on this, but if you use the same expression with $map it should work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 20:42:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1342334#M55358</guid>
      <dc:creator>MeghanBlair</dc:creator>
      <dc:date>2023-10-26T20:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps Arcade - FeatureSetByPortalItem - Failed to calculate (Object failed to load, unable to execute task)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1512380#M60581</link>
      <description>&lt;P&gt;I was hopeful but doesn't work for me.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2024 14:59:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/field-maps-arcade-featuresetbyportalitem-failed-to/m-p/1512380#M60581</guid>
      <dc:creator>mikaël</dc:creator>
      <dc:date>2024-07-30T14:59:15Z</dc:date>
    </item>
  </channel>
</rss>

