<?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 Combining layers - return FeatureSet() not working in ArcGIS Enterprise 10.9.1 Portal (Arcade version 1.13) in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/combining-layers-return-featureset-not-working-in/m-p/1352972#M8757</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I've made an&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class=""&gt;Arcade Data Expression that works fine in AGOL, but it will not work in&amp;nbsp;ArcGIS Enterprise 10.9.1 Portal (Arcade version 1.13). The problem is that&amp;nbsp;&lt;FONT face="courier new,courier" color="#000080"&gt;return FeatureSet(combinedDict)&lt;/FONT&gt; works fine in AGOL, but doesn't work in Portal. I read the documentation and with the difference in Arcade versions,&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier" color="#000080"&gt;return FeatureSet(Text(combinedDict))&lt;/FONT&gt;&amp;nbsp; should work, but it also doesn't. Both versions return &lt;FONT face="courier new,courier" color="#800000"&gt;"&lt;SPAN class=""&gt;Execution Error:&amp;nbsp;&lt;/SPAN&gt;Invalid Parameter"&lt;/FONT&gt;. Does anyone have a workaround or solution? I know the best would be to update our portal, but that's a whole other problem.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var portal = Portal('https://my.domain.nl/portal/');
// Create a FeatureSet for each Feature Layer. 
var slot_planning = FeatureSetByPortalItem(portal,'id1',0,['systeemdeel_nr','systeem_nr'],false);
var kw_init_scope = FeatureSetByPortalItem(portal,'id2',0,['systeemdeel_nr','systeem_nr'],false);

// Create empty array for features, feat object to populate array
var features = [];
var feat;

// Loop through each of the FeatureSets and populate feature array.
for (var sp in slot_planning) {
    feat = {
        attributes: {
            systeemdeel_nr: sp['systeemdeel_nr'],
            systeem_nr: sp['systeem_nr']
        },
    };
    Push(features, feat);
}

for (var kw in kw_init_scope) {
    feat = {
        attributes: {
            systeemdeel_nr: kw['systeemdeel_nr'],
            systeem_nr: kw['systeem_nr']
        },
    };
    Push(features, feat);
}

var combinedDict = {
    fields: [
        { name: 'systeemdeel_nr', type: 'esriFieldTypeString' },
        { name: 'systeem_nr', type: 'esriFieldTypeString' }
    ],
    features: features,
};

// Return dictionary cast as a feature set 
return FeatureSet(combinedDict); // works in AGOL, but does NOT work in Portal
return FeatureSet(Text(combinedDict)); // also does NOT work in Portal&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Nov 2023 15:09:06 GMT</pubDate>
    <dc:creator>Julia_vanRavenswaaij</dc:creator>
    <dc:date>2023-11-23T15:09:06Z</dc:date>
    <item>
      <title>Combining layers - return FeatureSet() not working in ArcGIS Enterprise 10.9.1 Portal (Arcade version 1.13)</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/combining-layers-return-featureset-not-working-in/m-p/1352972#M8757</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I've made an&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class=""&gt;Arcade Data Expression that works fine in AGOL, but it will not work in&amp;nbsp;ArcGIS Enterprise 10.9.1 Portal (Arcade version 1.13). The problem is that&amp;nbsp;&lt;FONT face="courier new,courier" color="#000080"&gt;return FeatureSet(combinedDict)&lt;/FONT&gt; works fine in AGOL, but doesn't work in Portal. I read the documentation and with the difference in Arcade versions,&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier" color="#000080"&gt;return FeatureSet(Text(combinedDict))&lt;/FONT&gt;&amp;nbsp; should work, but it also doesn't. Both versions return &lt;FONT face="courier new,courier" color="#800000"&gt;"&lt;SPAN class=""&gt;Execution Error:&amp;nbsp;&lt;/SPAN&gt;Invalid Parameter"&lt;/FONT&gt;. Does anyone have a workaround or solution? I know the best would be to update our portal, but that's a whole other problem.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var portal = Portal('https://my.domain.nl/portal/');
// Create a FeatureSet for each Feature Layer. 
var slot_planning = FeatureSetByPortalItem(portal,'id1',0,['systeemdeel_nr','systeem_nr'],false);
var kw_init_scope = FeatureSetByPortalItem(portal,'id2',0,['systeemdeel_nr','systeem_nr'],false);

// Create empty array for features, feat object to populate array
var features = [];
var feat;

// Loop through each of the FeatureSets and populate feature array.
for (var sp in slot_planning) {
    feat = {
        attributes: {
            systeemdeel_nr: sp['systeemdeel_nr'],
            systeem_nr: sp['systeem_nr']
        },
    };
    Push(features, feat);
}

for (var kw in kw_init_scope) {
    feat = {
        attributes: {
            systeemdeel_nr: kw['systeemdeel_nr'],
            systeem_nr: kw['systeem_nr']
        },
    };
    Push(features, feat);
}

var combinedDict = {
    fields: [
        { name: 'systeemdeel_nr', type: 'esriFieldTypeString' },
        { name: 'systeem_nr', type: 'esriFieldTypeString' }
    ],
    features: features,
};

// Return dictionary cast as a feature set 
return FeatureSet(combinedDict); // works in AGOL, but does NOT work in Portal
return FeatureSet(Text(combinedDict)); // also does NOT work in Portal&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 15:09:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/combining-layers-return-featureset-not-working-in/m-p/1352972#M8757</guid>
      <dc:creator>Julia_vanRavenswaaij</dc:creator>
      <dc:date>2023-11-23T15:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Combining layers - return FeatureSet() not working in ArcGIS Enterprise 10.9.1 Portal (Arcade version 1.13)</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/combining-layers-return-featureset-not-working-in/m-p/1354702#M8796</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/741615"&gt;@Julia_vanRavenswaaij&lt;/a&gt;&amp;nbsp;it looks like your combinedDict is missing a geometry. Does it work if you add something like&amp;nbsp;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;'geometryType': '',&lt;/STRONG&gt;&lt;/FONT&gt; ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 17:03:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/combining-layers-return-featureset-not-working-in/m-p/1354702#M8796</guid>
      <dc:creator>ArielLow2146</dc:creator>
      <dc:date>2023-11-29T17:03:04Z</dc:date>
    </item>
  </channel>
</rss>

