This is all the code that is relevant I think
var PolygonsUrl = "https://xxxx/arcgis/rest/services/Test/Poly/FeatureServer/0";
window.PolygonsLayer = new FeatureLayer({
url: PolygonsUrl,
outFields: ["*"],
visible: true
});
window.resultsLayer2 = new GraphicsLayer({
id: "resultsLayer2",
opacity: .5
});
var mapright = new Map({
basemap: "dark-gray",
layers: [resultsLayer2, resultsLayer4]
});
var viewright = new MapView({
container: "viewDivright",
map: mapright
});
function queryMultipartPolyongUniqueID4(feature) {
var str = feature;
var query = "";
query = window.MultiPartPolygonsLayer.createQuery();
query.where = "ID = '" + str + "'";
return window.PolygonsLayer.queryFeatures(query);
}
function displayResultsUniqueID(results) {
var features2 = results.features.map(function (graphic) {
graphic.symbol = {
type: "simple-fill",
color: [51, 51, 204, 0.9],
style: "solid",
outline: {
color: "white",
width: 1
}
};
return graphic;
});
window.resultsLayer2.addMany(features2);
viewright.goTo(features2.Extent);
}