I created a form to pull the nearest address using a calculated field and created a mechanism to add a custom address if wanted. It works fine in the Web Map, but in field maps, the address never shows up.
Code for Editable Flag:
Doesn't work in Field Maps.
Solved! Go to Solution.
I did not have my "Custom Address" switch visible in the Pop-up screen (because I did not really want it there.) When I added it into the Pop-up, it started working. It was always available in the edit screen, but making it available in pop-up is what worked.
Hi @DerekBernard , try removing the console statements are using something similar to this:
//Call the parcel layer as a feature set
var town = FeatureSetByName($map, "Parcels");
//Create a variable for the nearest parcel to the sign using a 50ft buffer
var nearestTown = First(Intersects(town, BufferGeodetic($feature, 50, "feet")));
//Return the name of the nearest town
return nearestTown.SITUS_COMMUNITY;
I did not have my "Custom Address" switch visible in the Pop-up screen (because I did not really want it there.) When I added it into the Pop-up, it started working. It was always available in the edit screen, but making it available in pop-up is what worked.