I want to populate the Street name, but it should be restricted based on the selected domain values (“RESERVE” & “PARK”) of another attribute field (LOCATION_GROUP). The following script is giving me the Street name, but it’s not restricting my SQL query only for “RESERVE” and “PARK”,
Var StreetID = $feature.Street_ID;
Var Location = FeatureSetByName($datastore, “Street_Locations”);
Var ids = “STREET_ID = ‘” + “LOCATION_GROUP = RESEREVE || LOCATION_GROUP = PARK‘” + StreetID + “’”; (maybe I am doing something wrong here)
Var related_ids = Filter(Location, ids);
Var cnt_street = Count(related_ids);
Var StreetName = “”;
if (cnt_street ==1){
For row (var row in related_ids){
StreetName = row.STREET_NAME;
}
else {
StreetName = “”;
}
Return StreetName;
Great to have your expert suggestion.
Kind regards,
Shahriar