I have an expression that is supposed to be used between a parent feature class and child table. The expression checks if an entered value in the child table matches a value in the parent table and returns good if so or bad if not. I've learned that featuresetbyrelationship name is bugged if there is a "." in the name of the relationship, which is unavoidable for us as we use a referenced geodatabase that has a "." in it. Does anyone know how I can modify the following script to use FeatureSetbyName and maybe the Filter function so I can avoid the relationship class? My code is below.
// load the related rows, using the name of the relationship class
var related_rows = FeaturesetByRelationshipName($feature, "GIS.SDE.tbl_Valve_FieldPressure")
// get the latest survey
var latest_survey = First(OrderBy(related_rows, "created_date DESC"))
// return a default value if no survey was found
if(latest_survey == null) {
return "Not surveyed yet"
}
// return good or bad depending on PSI
if(latest_survey.InputPostValvePressure == latest_survey.TargetPSI) {
return "Good"
}
return "Adjust Pressure - See PDF for Instructions"