I have a popup that includes Arcade Expressions, which appear just fine in the AGOL web map (The Arcade expressions populate the items under Owner Info:
But when I add this web map to a WAB Dev Edition application (v2.10), the arcade expressions do not appear. See the Owner Info section in the popup in the image below. There is no console error when this occurs.
However, when opening the Attribute Table widget, data does not render and the Javascript console does produce an error:
js.arcgis.com/3.26/init.js:115 Error: Runtime Error: Function Not Found: FeatureSetByName
This is an example of the arcade expression I'm using, which does call FeatureSetByName (mentioned in the console error)
var ownerTable = FeatureSetByName($datastore,"owner_info");
var parcelId = $feature.parcel;
var sql = "parcel = '" + parcelId + "'";
var ownerRecord = Filter(ownerTable, sql);
for (var f in ownerRecord){
return f.owner1
}
Solved! Go to Solution.
I think what you have found is that the FeatureSetByName was not yet implemented in version 3.26. In ArcGIS Online this function was release in the December update, so it is quite recent. In Enterprise it will be include in the 10.7 version which will be release in March. In case you can resolve the incompatibility issues in 3.27 that would be the way to go if you want to use the FeatureSetBy* functions in WAB Dev edition.
I did notice that pointing the deployed app's API version to 3.27 instead of 3.26 (which is what WAB 2.10 points to) seems to fix the problem with Arcade expressions not appearing. However, doing that causes some compatibility issues with other widgets. I also can't find anything that indicates theres a problem with these Arcade expressions in 3.26, so I'd prefer to find a solution that uses that version.
I think what you have found is that the FeatureSetByName was not yet implemented in version 3.26. In ArcGIS Online this function was release in the December update, so it is quite recent. In Enterprise it will be include in the 10.7 version which will be release in March. In case you can resolve the incompatibility issues in 3.27 that would be the way to go if you want to use the FeatureSetBy* functions in WAB Dev edition.
Seems that you're right. Thanks. I managed to get the other minor issues caused by the switch figured out, so it seems to be working.
Xander,
I'm having a similar issue where featuresetbyname is also not working in collector, but is working on web map. Any news on when featuresetbyname will be working with collector/or is there another work around you could suggest?
Regards,
Cody
Hi Cody Biondi ,
I am not sure if this will be included in Collector. You may have heard that Collector and other field apps are being merged together in one easy to use application called ArcGIS Field Maps (currently in beta). There will be better support for Arcade in this app. It would be best to participate in the beta program (ArcGIS Field Maps ). This allows you to validate the functionality and contribute with suggestions for enhancements so that you (and others) will be able to enable those workflows in the new software.
Xander,
Thank you very much for your time, I appreciate the guidance on topic. I look forward to hopefully seeing this resolved in the new application.
Regards,
Cody
The expressions that show on my Web Map popups are not available in the search or query wizards. What is the solution to make these expressions available, or recreate them for the Query and Search Wizards? Thank you!