I am using Map Viewer (not classic) to create a map using feature layers hosted on our AGOL account. I've made sure they are in spatial reference 3857. The Arcade script below is supposed to show the City Name from the city boundary layer that intersects with the tax lot I click on. I have this as an Arcade expression in the tax lot pop up. When I click on "Run" in the Arcade script window it gives me a valid response. I get no errors about the code. When I try to use it in the map though, the pop up shows a little spinning wheel for half a second and then is blank. I've researched code examples for this and no matter what I do, the results never display in the pop up. I'm obviously missing something here, can anyone explain what I am doing wrong?
var city_fields = ['CITYNAME']
var fac = FeatureSetByName($map, "City Boundaries", city_fields)
var intfac = First(Intersects($feature, fac))
If(IsEmpty(intfac)){
return 'Jurisdiction: Unincorporated Washington County'
} Else {
return city_fields
}