Robert,
Thank you once more for your help!
I was trying the above code with your suggestions. Not an idea how to incorporate in this block of code to get the message alert for both layers. Can you please help me . I am new to programming and trying to learn.
I also have tried this too:
on.once(this.map, 'update-end', lang.hitch(this, function () {
var aa = this.layerInfosObj.getLayerInfoById('Mylayer_1');
var bb = this.layerInfosObj.getLayerInfoById('Mylayer_2');
if (aa.layerObject.graphics.length=== 0) || bb.layerObject.graphics.length=== 0){
this._showMessage("No features found");
}
else {
var a1 = aa.layerObject.graphics.length ||var a2 = bb.layerObject.graphics.length;
this._showMessage(a1+a2+ " Feature(s) found");
}
}));