I am attempting to create a pop-up in a web map that shows information from a table of Survey123 results.
We have a map of fuel tanks, which serves as the main layer I want users to be able to click on and see the pop-up. Our field staff fill out Survey123 forms with a repeat for each tank, recording how much fuel was filled. The feature class and the table are related by a tankID field, in a one-to-many relationship. Not every tank has received a fill yet, so not every record in the layer has a match in the table.
Below is the expression I am trying to make work. This puts out an error, "Execution Error:Runtime Error: Cannot call member property on object of this type. fuelFilled"
var layerID = $feature.tankID
var formID = FeatureSetByName($map,"TankFillRecord")
var filterStatement = "tankID = @layerID"
var tank = filter(formID, filterStatement)
return tank.fuelFilled
Ideally, when this is working the expression will return the value of the fuelFilled field in the pop-up.