Looking for a source which lists Arcade limitations across products?

879
13
Jump to solution
07-09-2019 11:57 AM
Thomas-Zuberbuehler
New Contributor III

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.

0 Kudos
1 Solution

Accepted Solutions
Joshua-Young
Occasional Contributor III

The ArcGIS Arcade version matrix page on at the ArcGIS for Developers website states which Esri products support which version of ArcGIS Arcade. ArcGIS Online is not on the list but it should always support the latest version of ArcGIS Arcade.

Version Matrix | ArcGIS for Developers 

On the ArcGIS Arcade function reference page when you click on a function it will tell you at what version of ArcGIS Arcade the function was introduced.

Arcade Function Reference | ArcGIS for Developers 

It would be nice if the function reference page would just let you filter functions by version number to make it easier to see what you have to work with.

I hope this helps.

View solution in original post

13 Replies
Joshua-Young
Occasional Contributor III

The ArcGIS Arcade version matrix page on at the ArcGIS for Developers website states which Esri products support which version of ArcGIS Arcade. ArcGIS Online is not on the list but it should always support the latest version of ArcGIS Arcade.

Version Matrix | ArcGIS for Developers 

On the ArcGIS Arcade function reference page when you click on a function it will tell you at what version of ArcGIS Arcade the function was introduced.

Arcade Function Reference | ArcGIS for Developers 

It would be nice if the function reference page would just let you filter functions by version number to make it easier to see what you have to work with.

I hope this helps.

MichaelVolz
Esteemed Contributor

Have you tried Arcade on other types of fields such as text or numeric fields?  Maybe there is a limitation at this time with date/time fields.

0 Kudos
Thomas-Zuberbuehler
New Contributor III

Thank you Michael. It works as well with a simple count in a web map but not in Collector or a web app.

var relatedData = FeatureSetByName($datastore,"RelatedData")
var filteredRelatedData = Filter(relatedData, Concatenate("id=", $feature.id))
return Count(filteredRelatedData)‍‍‍‍‍‍‍‍‍
0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi moosetraveller ,

What error are you seeing when you test the Arcade expression in the configuration window?

I would probably make some minor adjustments:

var relatedData = FeatureSetByName($datastore,"RelatedData");
var filteredRelatedData = Filter(relatedData, Concatenate("id=", $feature.id));
var orderedFilteredRelatedData = OrderBy(filteredRelatedData, "date DESC");
var newest = First(orderedFilteredRelatedData);

var result = "";
if (IsEmpty(newest)) {
    result = "n/a";
} else {
    var installDate = newest.date;
    result = newest.name + " (" + Text(installDate, "Y-MM-DD HH:mm:ss") + ")";
}
return result;‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Are you sure that the data is related like this and not through an GlobalID? Because that would make the the query different. Also you can include some Console statements to see where the code fails.

0 Kudos
Thomas-Zuberbuehler
New Contributor III

Hi Xander Bakker‌,

 

Thank you very much but the script works great on ArcGIS Online in a web map, returns no error in the configuration window and values are correctly shown in the popups. (I modified and anonymized this script for this forum.)

 

The problem is, that when creating a map app using MapApp Builder, the expression is not evaluated and blank fields are shown.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi moosetraveller ,

You mention "MapApp Builder", are you referring to the Web AppBuilder (WAB)? Where are you seeing the blank fields? In Collector (using iOS or Android?) or in the web app?

0 Kudos
Thomas-Zuberbuehler
New Contributor III

Hi Xander Bakker‌,

Yes, I am referring to the Web AppBuilder.

ProductArcade Script works?
Web Map (Viewer)Yes
Web App (created with Web AppBuilder)No
Collector AppNo
Collector App (Early Access)No
0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi Thomas Zuberbuehler ,

Are you using the WAB Dev edition or the standard one provided in ArcGIS Online?

I have used Arcade (FeatureSetBy, Filter, Intersects, Buffer, etc) and it all works as expected in the WAB of ArcGIS Online:

See also the description on how I created this provided here:

https://community.esri.com/docs/DOC-12773-using-featuresetby-functions-in-arcade-to-drill-down-to-ot...

I you have WAB Dev edition, have a look at the version and see if there are any updates. 

0 Kudos
Thomas-Zuberbuehler
New Contributor III

Thank you Xander Bakker‌!

It is working and I found out why it did not work.

The problem was a change in the related table's name.

Since I have never reloaded the web viewer (since all popup changes were applied immediately) it did still work. I assume that the web viewer looks once the ID up using the layer's name and works with that ID afterwards. I guess this was the reason why it did not affect the web viewer.

I have marked Joshua Young's answer as the correct answer since he answers my question about a list of Arcade limitations/versions. But you definitively helped me more to fix the underlying problem! Thank you very much!

PS. I don't understand why there is no debug information. Do you know by chance if there is an option to have Arcade debug information in a web developer console when using a web app? 

0 Kudos