Arcade FeatureSet Function to Display Related Data in Attribute Table...Not Working as Expected

6808
11
07-22-2020 03:30 PM
BrantCarman
Occasional Contributor

Hi,

I'm using FeatureSetByID in an arcade expression to display attribute data from a related layer in my pop-ups and in the attribute table.  The pop-up functionality is working great, but I'm running into some issues with getting the related attributes to display in the attribute table in web map viewer, as well as in the attribute table widget in Web AppBuilder.

In order to view the attributes in the attribute table in web map viewer, you are required to click "Show" for each and every attribute, which obviously is not ideal when you have thousands of records.  See first Screenshot.

When I view the attribute table in Web AppBuilder, I instead see "[object Promise]" where my related attributes should display.  See second screenshot.

I'm wondering if I might be missing something in my arcade expression that would fix both of these issues.  Any assistance or input would be greatly appreciated.

Thank you!

PS, Here is a sample of the function I'm using to return related attributes:

   var relatedSite = FeatureSetById($datastore, /* Visual and Sample Survey Collections (Current) */ "0")

   var observNum = $feature["observation_number"]

   var badData = "Bad Data - Delete"

   var filterStatement = "observation_number = @observNum AND trap_status <> @badData"

   var hostFromSite = First(Filter(relatedSite,filterStatement))

   return hostFromSite.trap_type

11 Replies
XanderBakker
Esri Esteemed Contributor

Hi @PhilippeVDV ,

Sorry for the delay. I believe the new Dashboard was recently released in Enterprise 10.9. And yes I think it would be good to have support look at the way they manage arcade expressions in a table in WAB.

0 Kudos
PhilippeVDV
New Contributor III

@XanderBakker 

FYI, I was in contact with Esri support and the issue appears to be a bug: https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEzNzI1Nw==

The bug is both present in ArcGIS Online and in ArcGIS Enterprise. Also in the most recent version of ArcGIS Enterprise (10.9), the bug would still be present I've been told. Hopefully Esri can resolve this in 10.9.1

Best regards

Philippe