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