<?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: 1:M query in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714472#M66367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No. It says "field was not found"&lt;/P&gt;&lt;P&gt; I am able to see the related table in the identify window via arc map, so I know that the relationship is set up correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 May 2015 17:30:40 GMT</pubDate>
    <dc:creator>SandraDema</dc:creator>
    <dc:date>2015-05-27T17:30:40Z</dc:date>
    <item>
      <title>1:M query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714465#M66360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using javascript and asp, and using ArcGIS Server services.&amp;nbsp; I need to create a 1:M relationship and be able to query against the "many" table. For example:&lt;/P&gt;&lt;P&gt;For every house (a spatial feature), there can be multiple pets(a joined table from sql, with 0 to many entries per house). &lt;/P&gt;&lt;P&gt;Select * from join where pet = "dog".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have found several ways to join the data, but none that I can query against. Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 15:11:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714465#M66360</guid>
      <dc:creator>SandraDema</dc:creator>
      <dc:date>2015-05-27T15:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: 1:M query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714466#M66361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try creating a &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//0017000000mn000000"&gt;relationship class&lt;/A&gt;​?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 15:42:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714466#M66361</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2015-05-27T15:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: 1:M query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714467#M66362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For more details on Join and Relate tables,&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//005s0000002n000000#GUID-120CC07A-8338-486D-859A-5F8E0B2D3F97"&gt;About joining and relating tables&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 15:55:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714467#M66362</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2015-05-27T15:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: 1:M query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714468#M66363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It doesn't appear that I can query against the destination table in a relationship class, just the origin table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the link provided for Joining and Relating Tables, it says: &lt;/P&gt;&lt;P&gt;&lt;EM style="color: #4d4d4d; font-size: 12.8000001907349px; font-family: Arial, Helvetica, sans-serif;"&gt;In all cases of 1:M joins, only the first matching record is joined and displayed in the layer's attribute table&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I'm just missing something. 1 to many relationships are a vital part of most any modern database. &lt;/P&gt;&lt;P&gt;Maybe there is another way to accomplish what I need?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 16:15:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714468#M66363</guid>
      <dc:creator>SandraDema</dc:creator>
      <dc:date>2015-05-27T16:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: 1:M query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714469#M66364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to go for Relationship class.... Not Join. Join will add only the first matching record from the join table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 16:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714469#M66364</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2015-05-27T16:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: 1:M query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714470#M66365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot find a method to query against the relationship fields. Do you have an example that you could share?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 16:48:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714470#M66365</guid>
      <dc:creator>SandraDema</dc:creator>
      <dc:date>2015-05-27T16:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: 1:M query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714471#M66366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is a standard SQL query across two tables not working? Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14327469308642150" data-renderedposition="92_8_912_16" jivemacro_uid="_14327469308642150" modifiedtitle="true"&gt;&lt;P&gt;SELECT house.address, house.owner, pet.petname, pet.type FROM house JOIN pet ON house.ID=pet.ID WHERE pet.type='dog'&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 17:02:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714471#M66366</guid>
      <dc:creator>ToddBlanchette</dc:creator>
      <dc:date>2015-05-27T17:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: 1:M query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714472#M66367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No. It says "field was not found"&lt;/P&gt;&lt;P&gt; I am able to see the related table in the identify window via arc map, so I know that the relationship is set up correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 17:30:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714472#M66367</guid>
      <dc:creator>SandraDema</dc:creator>
      <dc:date>2015-05-27T17:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: 1:M query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714473#M66368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After publishing the service with a related table, you will find an operation "Query Related Records" in REST. Try it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/104041_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 18:32:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714473#M66368</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2015-05-27T18:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: 1:M query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714474#M66369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;I should have asked earlier. Have you tried &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000006r000000"&gt;Make Query Table&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;Make a SQL query in it similar to&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"HOUSE.HID" = "PET.HID"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here 1 HOUSE.HID record corresponds to multiple PET.HID records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 18:58:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714474#M66369</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2015-05-27T18:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: 1:M query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714475#M66370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As mentioned by &lt;A href="https://community.esri.com/migrated-users/62883"&gt;Jayanta Poddar&lt;/A&gt;​ , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You can query the REST Services using Query Related tables. &lt;/P&gt;&lt;P&gt; Ex:&amp;nbsp; &lt;A href="http://developers.arcgis.com/javascript/samples/fl_query_related_multiple/" title="http://developers.arcgis.com/javascript/samples/fl_query_related_multiple/"&gt;Query RelatedRecords Example&lt;/A&gt; &lt;/P&gt;&lt;P&gt; Query performed on the REST Service.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="pic1.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/104610_pic1.png" style="width: 620px; height: 410px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; and the Relationship query can be performed in the js api using the "RelationshipQuery" class&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 13:23:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/1-m-query/m-p/714475#M66370</guid>
      <dc:creator>JaiSiva1</dc:creator>
      <dc:date>2015-05-29T13:23:29Z</dc:date>
    </item>
  </channel>
</rss>

