syafid

Query to non spatial table return nothing

Discussion created by syafid on Feb 14, 2013
Latest reply on Feb 19, 2013 by dcastano
Hi there,
I hope somebody can help me.
I write a query to non spatial table that contain information on geometry that I click.
But no value return for var resultA.
Here's the code:
function kadcmkinfo1(lotno){
  qKADCMKinfo =  new esri.tasks.QueryTask("http://xx.xx.xx.xx:8399/arcgis/rest/services/v_pv/MapServer/9");//layer 9 V_PV_LOT_PROPLST_PROPLST_DETL
  var content1 = "";
  var queryInfo = new esri.tasks.Query();
  
  
  //queryInfo.returnGeometry = false;
  queryInfo.outFields = ["*"];
  //queryInfo.where = "LOT_NO_FORMATED = '" +lotno+ "'";                 //"NOLOT='"+ lotNo.replace("LOT", "Lot") +"' and h_lokasi='PRESINT "+ prct +"'";
  queryInfo.where = "LO_NO = 0007460";
  
  qKADCMKinfo.execute(queryInfo);
  
  dojo.connect(qKADCMKinfo,'onComplete',function(fInfo){  //onComplete
  var ptLot = "", ptBldgNo = "", ptValType = "", ptAnnlVal = "", ptDesc = "";
  var resultA = fInfo.features; 
  if (resultA.length == 0) alert("no value");
  alert(lotno);
  
  content1 = "<table border='1'><tr><th><b>"+lotno+"</b></th></tr>";
  for (var i=0; i=resultA.length; i++){
      alert(i);
   var grpc = resultA[i];
   ptLot = grpc.attributes["LOT_NO_FORMATED"];
   alert(ptLot);
   content1 += "<tr><td> Valuation Type :</td><td>" + ptLot + "</td>";
      content1 += "</tr>";
  
  }
   
  
  
  
  
  content1 +="</table>";          
  });
  
  
  
  
  
  
  return(content1);
  }

Is it something wrong in my code?

Please help me

Outcomes