Arcade IntersectLayer and\or FeatureSet Pop-up issue

597
2
03-22-2021 01:01 PM
mapmcburney
New Contributor II

Hello, 

Not sure if this is the right board or not. It probably should be in a generic "arcade" board but I couldn't find one.

I have an Arcade pop-up expression that works perfectly in the traditional Map Viewer.

PopUpResult.PNG

I would love for this pop-up to work in Collector or Explorer but they come up blank in both. The expressions above it work fine but they don't use IntersectLayer or FeatureSets. 

Ideally, I would like to be forward thinking and have the expression work in the Beta Map Viewer and Field Maps but they don't work there either. 

If anyone has any ideas please send them my way. At the end of the day, I want it to work on a mobile app experience (Collector, Explorer, Field Maps).

Here is the Arcade expression;

var intersectLayer =Intersects(FeatureSetByName($map,"Revisits"), $feature)
var cnt = Count(intersectLayer);
var visits = "";
var order = "";

if (cnt > 0){
visits = 'There has been ' + Text(cnt) + ' revists to this site:';
order = OrderBy(intersectLayer, 'visitDate DESC')
for (var f in order){
var visit_date = Text(f.visitDate, ' Y/MM/DD: ');
var visit_obs = visit_date + DomainName(f,"changeFieldStatus");
visits += TextFormatting.NewLine + visit_obs;
}
}
else {
visits = "No visits recorded.";
}
return visits;

0 Kudos
2 Replies
DougMorgenthaler
Esri Regular Contributor

@mapmcburneyfrom a mobile perspective Arcade featuresets are not supported in Collector or Explorer.  They are, however supported in ArcGIS Field Maps.  Can you elaborate on the specifics of the layers you are querying against?  

0 Kudos
kmsmikrud
Occasional Contributor III

Hi @DougMorgenthaler ,

Thanks for the info on Arcade featuresets being supported in ArcGIS Field Maps. I am currently trying to get featuresets to work in a survey map in Field Maps. Are featuresets supported offline? If not is this functionality in the next update?

Update:

I can get the featureset to work in the New Map Viewer but when I try the map in the Field Maps app the expressions do not show. I now just saved the web map from the New Map Viewer to the Classic Viewer and I again could view the featureset expression in the pop-up. I created an offline map area and the expression seems to work as it should offline!!

Why would the featureset expression not work in a web map saved in the New Map Viewer within Field Maps? This seems like a bug?

Thanks for any insight,

Kathy

 

Thank-you!,

Kathy

0 Kudos