I have a point feature with a related inspection table that is a one to many relationship. I want to be able to reference values in the related table and pass them to survey123 via a custom URL. I'm able to create a custom attribute expression to get the values I need in ArcOnline. But when I try to access the attribute expressions values or incorporate them into a Custom URL to pass to survey123, I'm unable to. Specifically I need to be able to use the FeatureByName function in field maps/collector.
Below is the custom attribute expression I'm using to pull the most recent inspection data. I then reference the custom attribute in a custom URL to pass the data to Survey123. It functions perfectly if I use a browser and open the pop up there, but when opening the popup in the apps, it gives me 0s or errors. I'd love for this to function in Field Maps or Collector.
var sql = "FACILITYID = '"+$feature.FACILITYID + "'";
var tbl = Filter(FeatureSetByName($map,"pumpstation_gdb - PumpStationinspection"), sql)
if ((Count(tbl))==0) {
return "no records found"
}
else {
return First(OrderBy(tbl, 'REPDATE DESC')).H2OLEV
}
Below is more detailed info on what I was trying to do with the script.
Solved: Re: How to create an arcade expression to show mos... - GeoNet, The Esri Community
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.