<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using substring to query, show result in datagrid in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-substring-to-query-show-result-in-datagrid/m-p/120053#M11189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Tried both..it does not working. Seems like does not know/understand OBJECTID because the field is called PAD.LP_PAD.OBJECTID. if no substring used (spatial does not join with other table), then I can use OBJECTID only&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can look at your service directory to see how the field names are listed. if the field listed as PAD.LP_PAD.OBJECTID, then the statement should be&amp;nbsp; clickedTaxLotId = grid.getItem(evt.rowIndex).PAD.LP_PAD.OBJECTID&lt;/SPAN&gt;&lt;STRONG&gt;[0]&lt;/STRONG&gt;&lt;SPAN&gt;. the best way to find out is to debug the statement.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jun 2011 12:03:25 GMT</pubDate>
    <dc:creator>HemingZhu</dc:creator>
    <dc:date>2011-06-06T12:03:25Z</dc:date>
    <item>
      <title>Using substring to query, show result in datagrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-substring-to-query-show-result-in-datagrid/m-p/120050#M11186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a spatial layer which is join with a table, therefore all the field name will be in substring like PAD.LP_PD.OBJECTID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have no issue to run query from the substring, but i am stuck at function to zoom to selected feature/polygon when user click a row in datagrid(result from query).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below is the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; //Zoom to the parcel when the user clicks a row&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; function onRowClickHandler(evt){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;STRONG&gt;var OBJECTID = ("PAD.LP_PAD.OBJECTID");&lt;BR /&gt; var clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt; var selectedTaxLot;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; dojo.forEach(map.graphics.graphics,function(graphic){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if((graphic.attributes) &amp;amp;&amp;amp; graphic.attributes.OBJECTID === clickedTaxLotId){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; selectedTaxLot = graphic;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; return;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; });&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var taxLotExtent = selectedTaxLot.geometry.getExtent();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; map.setExtent(taxLotExtent);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried using this declaration:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var clickedTaxLotId = grid.getItem(evt.rowIndex).(PAD.LP_PAD.OBJECTID);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var clickedTaxLotId = grid.getItem(evt.rowIndex).valueOf(PAD.LP_PAD.OBJECTID);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but those two declaration will take the whole result in datagrid, not the exact selected row.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please advice..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Suggestion is highly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 07:46:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-substring-to-query-show-result-in-datagrid/m-p/120050#M11186</guid>
      <dc:creator>hayaticm</dc:creator>
      <dc:date>2011-06-02T07:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using substring to query, show result in datagrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-substring-to-query-show-result-in-datagrid/m-p/120051#M11187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Hi,&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I have a spatial layer which is join with a table, therefore all the field name will be in substring like PAD.LP_PD.OBJECTID.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I have no issue to run query from the substring, but i am stuck at function to zoom to selected feature/polygon when user click a row in datagrid(result from query).&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;Below is the code:&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; //Zoom to the parcel when the user clicks a row&amp;nbsp; &lt;BR /&gt; function onRowClickHandler(evt){&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: &amp;quot;Red&amp;quot;;"&gt;var OBJECTID = ("PAD.LP_PAD.OBJECTID");&lt;BR /&gt; var clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID;&lt;/STRONG&gt; &lt;BR /&gt; var selectedTaxLot;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; dojo.forEach(map.graphics.graphics,function(graphic){&amp;nbsp; &lt;BR /&gt; if((graphic.attributes) &amp;amp;&amp;amp; graphic.attributes.OBJECTID === clickedTaxLotId){&amp;nbsp; &lt;BR /&gt; selectedTaxLot = graphic;&amp;nbsp; &lt;BR /&gt; return;&amp;nbsp; &lt;BR /&gt; }&amp;nbsp; &lt;BR /&gt; });&amp;nbsp; &lt;BR /&gt; var taxLotExtent = selectedTaxLot.geometry.getExtent();&amp;nbsp; &lt;BR /&gt; map.setExtent(taxLotExtent);&amp;nbsp; &lt;BR /&gt; }&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I have tried using this declaration:&amp;nbsp; &lt;BR /&gt;var clickedTaxLotId = grid.getItem(evt.rowIndex).(PAD.LP_PAD.OBJECTID);&amp;nbsp; &lt;BR /&gt;var clickedTaxLotId = grid.getItem(evt.rowIndex).valueOf(PAD.LP_PAD.OBJECTID);&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;but those two declaration will take the whole result in datagrid, not the exact selected row.&amp;nbsp; &lt;BR /&gt;Please advice..&amp;nbsp; &lt;BR /&gt;Suggestion is highly appreciated.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this: either change &lt;/SPAN&gt;&lt;STRONG&gt;clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID &lt;/STRONG&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;STRONG&gt;clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID[0]&lt;/STRONG&gt;&lt;SPAN&gt;, or loose up the comparsion &lt;/SPAN&gt;&lt;STRONG&gt;graphic.attributes.OBJECTID === clickedTaxLotId&lt;/STRONG&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;STRONG&gt;graphic.attributes.OBJECTID == clickedTaxLotId&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 12:20:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-substring-to-query-show-result-in-datagrid/m-p/120051#M11187</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-06-02T12:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using substring to query, show result in datagrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-substring-to-query-show-result-in-datagrid/m-p/120052#M11188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Try this: either change &lt;STRONG&gt;clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID &lt;/STRONG&gt; to &lt;STRONG&gt;clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID[0]&lt;/STRONG&gt;, or loose up the comparsion &lt;STRONG&gt;graphic.attributes.OBJECTID === clickedTaxLotId&lt;/STRONG&gt; to &lt;STRONG&gt;graphic.attributes.OBJECTID == clickedTaxLotId&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tried both..it does not working. Seems like does not know/understand OBJECTID because the field is called PAD.LP_PAD.OBJECTID. if no substring used (spatial does not join with other table), then I can use OBJECTID only&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 06:35:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-substring-to-query-show-result-in-datagrid/m-p/120052#M11188</guid>
      <dc:creator>hayaticm</dc:creator>
      <dc:date>2011-06-06T06:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using substring to query, show result in datagrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-substring-to-query-show-result-in-datagrid/m-p/120053#M11189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Tried both..it does not working. Seems like does not know/understand OBJECTID because the field is called PAD.LP_PAD.OBJECTID. if no substring used (spatial does not join with other table), then I can use OBJECTID only&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can look at your service directory to see how the field names are listed. if the field listed as PAD.LP_PAD.OBJECTID, then the statement should be&amp;nbsp; clickedTaxLotId = grid.getItem(evt.rowIndex).PAD.LP_PAD.OBJECTID&lt;/SPAN&gt;&lt;STRONG&gt;[0]&lt;/STRONG&gt;&lt;SPAN&gt;. the best way to find out is to debug the statement.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 12:03:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-substring-to-query-show-result-in-datagrid/m-p/120053#M11189</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-06-06T12:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using substring to query, show result in datagrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-substring-to-query-show-result-in-datagrid/m-p/120054#M11190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can look at your service directory to see how the field names are listed. if the field listed as PAD.LP_PAD.OBJECTID, then the statement should be&amp;nbsp; clickedTaxLotId = grid.getItem(evt.rowIndex).PAD.LP_PAD.OBJECTID&lt;STRONG&gt;[0]&lt;/STRONG&gt;. the best way to find out is to debug the statement.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your advice, have to try to debug the code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 05:50:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-substring-to-query-show-result-in-datagrid/m-p/120054#M11190</guid>
      <dc:creator>hayaticm</dc:creator>
      <dc:date>2011-06-07T05:50:02Z</dc:date>
    </item>
  </channel>
</rss>

