When trying to obtain data from another layer in the pop-up I use this code:
var address = FeatureSetByName($map,"Civic Addresses",['full_address'], false)
return address
Which populates results, as shown below:
But when I go view the popup I get [object Object] instead of the civic address, described in the code above.
I used this link for reference.
Has anyone ran into this issue, if so how did you fix it?
Thank you in advance
That function returns a FeatureSet object which the popup appears to have trouble with. There's probably a way to turn that into popup friendly data, but chances are you just want one address's data or an aggregate of address data based on the feature selected. Try something like this:
var addresses = FeatureSetByName($map,"Civic Addresses",['full_address'], false);
var filter_value = $feature.my_field;
var address = First(Filter(addresses, "full_address = @filter_value")); // Replace with a proper SQL statement
return address.full_address