<?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: Can you set multiple idProperty fields in Dojo Grid? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-set-multiple-idproperty-fields-in-dojo/m-p/354619#M32860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your prompt response. Perhaps I need to provide a bit more information about my problem. I have an attribute called Drawing # in my layers, which was supposed to be unique, but it turns out is not. For example, more than one line might have the same Drawing #. If I use&amp;nbsp;ObjectID as IdProperty for the dgrid, I have no problem zooming in to a feature when that feature is clicked on the grid.&lt;BR /&gt;Now my application allows users to select multiple records from the grid. When that happens I need to pass all the Drawing #s selected by the user to a web service. My problem is that the &lt;EM&gt;grid.selection &lt;/EM&gt;returns the IdProperty&amp;nbsp;values of the selected rows. I can't seem to find a way to extract the Drawing #s from the selection unless the Drawing # is set as IdProperty. That's why I was thinking that if it was possible to have multiple IdProperty values, I could set the Drawing # to be one of those values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Grid showing non-unique values." class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/365350_NonUniqueValues.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Aug 2017 22:21:12 GMT</pubDate>
    <dc:creator>MarioEstevez</dc:creator>
    <dc:date>2017-08-01T22:21:12Z</dc:date>
    <item>
      <title>Can you set multiple idProperty fields in Dojo Grid?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-set-multiple-idproperty-fields-in-dojo/m-p/354617#M32858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a Dojo Grid to display the features selected on a map. I wonder if it's possible to have more than one field as idProperty. The reason I need this is because I need to use one of the IDs to select the feature on the map when the row is clicked on the grid. And I need to other key value to pass it to a web service once the user selects multiple&amp;nbsp; records from the grid. &lt;/P&gt;&lt;P&gt;If having multiple IdProperty fields is not possible, then I need to know if I can get all the columns from a selected row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2017 18:52:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-set-multiple-idproperty-fields-in-dojo/m-p/354617#M32858</guid>
      <dc:creator>MarioEstevez</dc:creator>
      <dc:date>2017-08-01T18:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set multiple idProperty fields in Dojo Grid?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-set-multiple-idproperty-fields-in-dojo/m-p/354618#M32859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mario,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Assigning multiple IdProperty fields is not the proper solution if it even is possible. You just use your click event :&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;grid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;".field-id:click"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; someFunction&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// fires when a row in the dgrid is clicked&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;someFunction&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; row &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; grid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;row&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;info&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;data&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// This has all the row data&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:37:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-set-multiple-idproperty-fields-in-dojo/m-p/354618#M32859</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T16:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set multiple idProperty fields in Dojo Grid?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-set-multiple-idproperty-fields-in-dojo/m-p/354619#M32860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your prompt response. Perhaps I need to provide a bit more information about my problem. I have an attribute called Drawing # in my layers, which was supposed to be unique, but it turns out is not. For example, more than one line might have the same Drawing #. If I use&amp;nbsp;ObjectID as IdProperty for the dgrid, I have no problem zooming in to a feature when that feature is clicked on the grid.&lt;BR /&gt;Now my application allows users to select multiple records from the grid. When that happens I need to pass all the Drawing #s selected by the user to a web service. My problem is that the &lt;EM&gt;grid.selection &lt;/EM&gt;returns the IdProperty&amp;nbsp;values of the selected rows. I can't seem to find a way to extract the Drawing #s from the selection unless the Drawing # is set as IdProperty. That's why I was thinking that if it was possible to have multiple IdProperty values, I could set the Drawing # to be one of those values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Grid showing non-unique values." class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/365350_NonUniqueValues.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2017 22:21:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-set-multiple-idproperty-fields-in-dojo/m-p/354619#M32860</guid>
      <dc:creator>MarioEstevez</dc:creator>
      <dc:date>2017-08-01T22:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set multiple idProperty fields in Dojo Grid?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-set-multiple-idproperty-fields-in-dojo/m-p/354620#M32861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;Mario,&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp; So you just get the selected row ids from the grid and use the row data method I have in my code to get&amp;nbsp;the drawing id for each of the selected rows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2017 22:26:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-set-multiple-idproperty-fields-in-dojo/m-p/354620#M32861</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-08-01T22:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can you set multiple idProperty fields in Dojo Grid?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-set-multiple-idproperty-fields-in-dojo/m-p/354621#M32862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I went with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection = [];&lt;/P&gt;&lt;P&gt;var selected = grid.selection;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (selRow in selected) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var gridRow = grid.row(selRow);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selection.push(gridRow.data.CONSTRUCTION_DRAWING);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 00:08:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-you-set-multiple-idproperty-fields-in-dojo/m-p/354621#M32862</guid>
      <dc:creator>MarioEstevez</dc:creator>
      <dc:date>2017-08-02T00:08:29Z</dc:date>
    </item>
  </channel>
</rss>

