I have an attribute expression using in a popup which is shown in a ArcGIS web map but not in a web app or in collector.
var relatedData = FeatureSetByName($datastore,"RelatedData")
var filteredRelatedData = Filter(relatedData, Concatenate("id=", $feature.id))
var orderedFilteredRelatedData = OrderBy(filteredRelatedData, 'date DESC')
var newest = First(orderedFilteredRelatedData)
if (IsEmpty(newest)) {
"n/a"
}
else {
var installDate = newest.date
newest.name + " (" + Text(installDate, "Y-MM-DD HH:mm:ss") + ")"
}
I have already resigned to the fact that this does not work in ArcGIS Collector. And now it seems that this is also not working in a web app. This is really frustrating.
However, I am looking for a web page or document which lists Arcade limitations across all ESRI products. Any idea where I do find something like that?
PS. I do know that above Arcade expression is not performant.
Solved! Go to Solution.
Hi moosetraveller ,
Glad to hear it is working. It's OK to mark Joshua's answer as the correct one.
For "debug information" I would probably use "Console" statements in the Arcade expression to track what is happening at certain points of the expression.
Thank you for your hint with the Console function!
I did not know that it also prints to a JavaScript console.
It's not really documented: https://developers.arcgis.com/arcade/function-reference/data_functions/#console
Hi moosetraveller ,
That is good to know. Thanks for sharing!
Thank you Joshua Young, that helps already a lot!
It answers my question.
I found the following source but my understanding is that the web app we use runs with ArcGIS JS 3.29 aka newest version:
I have analyzed the source code of the web (map) app by using a developer console. It seems to be ArcGIS JS 3.29. Therefore, Arcade 1.7 should be supported according to the matrix. But it's actually not... or I miss something.