Select to view content in your preferred language

EB 1.8 Feature Info Widget does not honor certain arcade

692
4
04-26-2022 01:51 PM
DavidColey
Honored Contributor

Hello - the Feature Info widget does not seem to honor arcade expressions that use the $feature type.  I am buffering a feature to return info as a list about bordering or coincident features (like zoning types that border a adjacent zoning poly), but the Feature Info widget will not bring up my list.  The map viewer popup returns the arcade just fine.

Any Suggestions?

Tags (2)
0 Kudos
4 Replies
DavidColey
Honored Contributor

Update: Here is an example:

DavidColey_0-1651069152718.png

 

The Adjacent Zoning Descriptions is a list generated by buffering the feature and returning the features that intersect the buffer as a list.

Why wouldn't the Feature Info widget return the Arcade-generated list the same as the Map Info window??

It would seem to me that the Feature Info Widget would certainly recognize the $feature profile that is being used.

@RobertScheitlin__GISP 

@KenBuja 

0 Kudos
DavidColey
Honored Contributor

Hmm, sorry all.  I somehow missed the 'Related Posts' above stating that there is a compatibility issue with complex arcade being returned as a result in the Feature Info.  Apparently still an issue at this 1.8 release.  It will be helpful when either this is addressed or maybe somehow the List widget can return the map popup as an option . . .  

DavidColey
Honored Contributor

Update.

So it turns out that the Feature Info Widget DOES display complex Arcade expressions as part of the display, but only for small datasets.  I do not know what the limit is, but it is certainly less than the 2500 zoning records that I am working with.  

So something like this:

var newBuffer = FeatureSetByName($map,"County Zoning");//need a feature
//var newBuffer = $feature; //need a feature
var buffResults = false; //need a bool

function getArea(){
    if ($feature.zoningcode != 'MP' && $feature.zoningcode != 'SARASOTA' && $feature.zoningcode != 'NORTH PORT' && $feature.zoningcode != 'VENICE'){
        BufferGeodetic($feature, 2, 'meters');
    } else {
         $feature.zoningcode;
    }
}
var myBuffer = getArea();

if (myBuffer == $feature.zoningcode){
    buffResults = false;
} else {
    buffResults = true;
    newBuffer = myBuffer;
}
var myCen = Centroid($feature);

var onezoning = Intersects($layer, myCen);
var allzoning = Intersects($layer, newBuffer)

var oneType = Distinct(onezoning, "zoningdesignation");
var allTypes = Distinct(allzoning, "zoningdesignation");

var zoning_count = Count(allzoning);

var inizt = '';
var znlist = '';

function GetInitDomainDct() {
    var dom = Domain(onezoning, "zoningdesignation");
    var cvs = dom["codedValues"];
    var dct = {};
    for (var i in cvs) {
        var cv = cvs[i];
        dct[cv["code"]] = cv["name"];
    }
    return dct;    
}
var rt1 = GetInitDomainDct();

function GetDomainDct() {
    var domAll = Domain(allzoning, "zoningdesignation");
    var cvsAll = domAll["codedValues"];
    var dctAll = {};
    for (var j in cvsAll) {
        var cvAll = cvsAll[j];
        dctAll[cvAll["code"]] = cvAll["name"];
    }
    return dctAll;    
}
var rtall = GetDomainDct();

for (var k in oneType){
    
    inizt = rt1[k.zoningdesignation] + TextFormatting.NewLine;
    }
for (var m in allTypes)
    {
        znlist += rtall[m.zoningdesignation]+ TextFormatting.NewLine;
    }
var munZone = 'Marine Park and Municipality zoning areas are too complex to list adjancent zoning . . .'
var newList = '';
newList = Trim(Replace(znlist,inizt,''));

if (buffResults == false){
    return munZone;
} else {
    return newList;
}

 

Where I am getting at coincident polygons to return information on them (but not the selected polygon, and I have to pre-filter out super-complex large polygons that absolutely kill the return time) -

works just fine in the map.  BUT: for the Feature Info in EB, if I want a return there is some limit on how many records are in the feature set that can display in a list like I show above.

I don't know what that limit is, but it is less than 2000.  Maybe this can be addressed for the Online version at some point?  

Otherwise, maybe there is some fetch limit or something in EB Dev Feature Info that can be bumped up somewhere?

@RobertScheitlin__GISP 

@KenBuja 

@TonghuiMing 

@ShengdiZhang 

@XanderBakker 

 

 

0 Kudos
DavidColey
Honored Contributor

Update 3:

So the way I manage my layers is through by-reference collaboration.  It turns out that at an original publish time, if the max record count is not set high enough, that is the property that is being read:

 

.....
 "properties": {
    "enableZDefaults": "true",
    "allowUpdateWithoutMValues": "true",
    "allowedUploadFileTypes": "jpeg,tiff,gen,obj,shapebuffer,gtx,dae,xyz,hgt,meshwrapper,shapebufferg,ifc,fbx,n1,mtl,dwg,glb,gltf,e00,ace2,asc,gff,bmp,bt,dat,ddf,bin,dem,jpg,gif,rda,grb,grc,grd,gsb,hdr,raw,hf2,img,lcp,mem,mpl,mpr,ntf,pix,png,pnm,rst,rsw,sdat,tif,vrt,xpm",
    "outputDir": "\\\\scggisis01pw\\agshost\\directories\\arcgisoutput",
    "maxScale": "4513.9887049999998",
    "allowGeometryUpdates": "true",
    "maxRecordCount": "2000", 
.....

 

 

But what was throwing me off is the fact that after I overwrite the originally published SD each week to keep the data current, I go in through the python api and update the properties to up my maxRecordCount to either 4000 or 4900:

 

 "jsonProperties": {
    "allowGeometryUpdates": true,
    "adminServiceInfo": {
      "database": {"datasource": {"name": "/enterpriseDatabases/AGSDataStore_ds_3p0297n8"}},
      "name": "CountyZoning",
      "serviceViews": [{
        "serviceItemId": "f76c518a40bf4f13aed9ebbadc430b01",
        "refCount": 1,
        "name": "CountyZoningView",
        "type": "FeatureServer"
      }],
      "type": "FeatureServer",
      "status": "Started"
    },
    "supportsApplyEditsWithGlobalIds": true,
    "maxRecordCount": 4000,
    "description": "The County Zoning layer contains zoning designation polys for Sarasota County.",

 

Still doesn't work though.  Something else is preventing display.  Worked in the morning with a new layer, doesn't work in the afternoon with an updated layer. 

 

 

0 Kudos