<?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 How to limit child rows in replica with QueryOption? in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-limit-child-rows-in-replica-with/m-p/347956#M4053</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have an application that uses the .NET SDK to create offline replicas from ArcGIS Server. We need to get some very specific data to the replica so we're using the LayerQueries to tell the SDK what to get.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that, for one layer, the SDK seems to always get all the related rows no matter what the QueryOption is. The &lt;A href="https://developers.arcgis.com/net/store/api-reference/html/T_Esri_ArcGISRuntime_Tasks_Offline_QueryOption.htm"&gt;documentation&lt;/A&gt; says that &lt;SPAN style="font-family: courier new,courier;"&gt;QueryOption.UseFilter&lt;/SPAN&gt; should ignore the &lt;SPAN style="font-family: courier new,courier;"&gt;IncludeRelated&lt;/SPAN&gt; flag, but it doesn't seem to do so in our case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used Fiddler to capture the REST call to the ArcGIS server and the LayerQuery for our layer is (see the attachments for complete layerquery):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;"22":{"where":"OBJECTID IN (15076)","queryOption":"useFilter"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The layer in question is related to a parent table. If the parent table (layer 15) is added to LayerQueries, then all its related rows (layer 22) are added to the replica no matter what QueryOptions or IncludeRelated values I choose. You can see in the attached screenshot that the replica geodatabase contains more than one row for the layer 22.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question comes down to this: &lt;STRONG&gt;is there a way to limit the child rows when creating replica?&lt;/STRONG&gt; And shouldn't the QueryOption and Where clause be enough to limit the child rows in the replica?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Apr 2015 12:41:29 GMT</pubDate>
    <dc:creator>JuhoVainio</dc:creator>
    <dc:date>2015-04-22T12:41:29Z</dc:date>
    <item>
      <title>How to limit child rows in replica with QueryOption?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-limit-child-rows-in-replica-with/m-p/347956#M4053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have an application that uses the .NET SDK to create offline replicas from ArcGIS Server. We need to get some very specific data to the replica so we're using the LayerQueries to tell the SDK what to get.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that, for one layer, the SDK seems to always get all the related rows no matter what the QueryOption is. The &lt;A href="https://developers.arcgis.com/net/store/api-reference/html/T_Esri_ArcGISRuntime_Tasks_Offline_QueryOption.htm"&gt;documentation&lt;/A&gt; says that &lt;SPAN style="font-family: courier new,courier;"&gt;QueryOption.UseFilter&lt;/SPAN&gt; should ignore the &lt;SPAN style="font-family: courier new,courier;"&gt;IncludeRelated&lt;/SPAN&gt; flag, but it doesn't seem to do so in our case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used Fiddler to capture the REST call to the ArcGIS server and the LayerQuery for our layer is (see the attachments for complete layerquery):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;"22":{"where":"OBJECTID IN (15076)","queryOption":"useFilter"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The layer in question is related to a parent table. If the parent table (layer 15) is added to LayerQueries, then all its related rows (layer 22) are added to the replica no matter what QueryOptions or IncludeRelated values I choose. You can see in the attached screenshot that the replica geodatabase contains more than one row for the layer 22.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question comes down to this: &lt;STRONG&gt;is there a way to limit the child rows when creating replica?&lt;/STRONG&gt; And shouldn't the QueryOption and Where clause be enough to limit the child rows in the replica?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 12:41:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-limit-child-rows-in-replica-with/m-p/347956#M4053</guid>
      <dc:creator>JuhoVainio</dc:creator>
      <dc:date>2015-04-22T12:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to limit child rows in replica with QueryOption?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-limit-child-rows-in-replica-with/m-p/347957#M4054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have you been able to resolve or work around this? I'm facing the same problem with Layerqueries, where the child table's LayerQuery seems to completely ignore the where-clause and all other options for that matter if the parent table also exists in layer queries; and take all related rows instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 07:55:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-limit-child-rows-in-replica-with/m-p/347957#M4054</guid>
      <dc:creator>IljaVanhanen</dc:creator>
      <dc:date>2017-03-14T07:55:57Z</dc:date>
    </item>
  </channel>
</rss>

