Select to view content in your preferred language

Combining layers - return FeatureSet() not working in ArcGIS Enterprise 10.9.1 Portal (Arcade version 1.13)

631
1
11-23-2023 07:09 AM
Julia_vanRavenswaaij
New Contributor

Hello everyone,

I've made an Arcade Data Expression that works fine in AGOL, but it will not work in ArcGIS Enterprise 10.9.1 Portal (Arcade version 1.13). The problem is that return FeatureSet(combinedDict) works fine in AGOL, but doesn't work in Portal. I read the documentation and with the difference in Arcade versions,  return FeatureSet(Text(combinedDict))  should work, but it also doesn't. Both versions return "Execution Error: Invalid Parameter". Does anyone have a workaround or solution? I know the best would be to update our portal, but that's a whole other problem.

 

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

 

 

0 Kudos
1 Reply
ArielLow2146
Frequent Contributor

@Julia_vanRavenswaaij it looks like your combinedDict is missing a geometry. Does it work if you add something like 'geometryType': '', ?

0 Kudos