<?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: ArcGIS Online Layer Query in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33915#M1696</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Supriya, thank you so much for responding to my post.&amp;nbsp; Yes, the create replica works when the query is left out. I am Creating the replica from the Rest url, see below.&amp;nbsp; You'll notice the url appears as it should.&amp;nbsp; When I click the url I get a failed status and error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/396555_pastedImage_1.png" style="width: 620px; height: 504px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/396556_pastedImage_2.png" style="width: 522px; height: 281px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Feb 2018 23:03:15 GMT</pubDate>
    <dc:creator>ChrisKemmerer</dc:creator>
    <dc:date>2018-02-13T23:03:15Z</dc:date>
    <item>
      <title>ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33913#M1694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a hosted FeatureLayer in a Webmap that contains multiple features for data collections that will be used across multiple projects.&amp;nbsp; I'd like to be&amp;nbsp;able to pull down data and attachments from those layers using a layer query in the create replica wizard .&amp;nbsp; For this example I have layers 0-3, all layers have a common attribute, "Project_Number".&amp;nbsp; I would like to do something similar to the example below.&amp;nbsp; So far I have tested the first line, while it produces a url to download the data the replica creation fails.&amp;nbsp; Unfortunately it does not provide an error number, only that it failed.&amp;nbsp; Any insight would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXAMPLE:&lt;/P&gt;&lt;P&gt;{"0":{"where":"Project_Number=842"}}&lt;BR /&gt;{"1":{"where":"Project_Number=842"}}&lt;BR /&gt;{"2":{"where":"Project_Number=842"}}&lt;BR /&gt;{"3":{"where":"Project_Number=842"}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK REPLICA STATUS ERROR:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/396483_pastedImage_1.png" style="width: 281px; height: 107px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 17:51:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33913#M1694</guid>
      <dc:creator>ChrisKemmerer</dc:creator>
      <dc:date>2018-02-13T17:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33914#M1695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;OL&gt;&lt;LI&gt;Does the create replica work if you leave the layer query out of the equation?&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Are you creating the replica from the REST url? Could you put a screenshot for how you fill out the other parameters involved in creating a replica from REST?&lt;/LI&gt;&lt;LI&gt;Perhaps this article can offer some guidance:&amp;nbsp;&lt;A class="link-titled" href="https://support.esri.com/en/technical-article/000012232" title="https://support.esri.com/en/technical-article/000012232"&gt;How To: Retrieve attachments from a hosted feature service&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 22:46:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33914#M1695</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-02-13T22:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33915#M1696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Supriya, thank you so much for responding to my post.&amp;nbsp; Yes, the create replica works when the query is left out. I am Creating the replica from the Rest url, see below.&amp;nbsp; You'll notice the url appears as it should.&amp;nbsp; When I click the url I get a failed status and error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/396555_pastedImage_1.png" style="width: 620px; height: 504px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/396556_pastedImage_2.png" style="width: 522px; height: 281px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 23:03:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33915#M1696</guid>
      <dc:creator>ChrisKemmerer</dc:creator>
      <dc:date>2018-02-13T23:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33916#M1697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do any of the records in layer 4 (above) actually have attachments? I found that if I tried something similar to what you showed in the screenshot above on a layer that didn't have any attachments I got the "Error: Exporting data for layer X failed". But, if I tried the same thing above on a layer with attachments it succeeded.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 23:58:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33916#M1697</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-02-13T23:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33917#M1698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All records in Layer 4 have attachments.&amp;nbsp; Could there be something in the feature layer settings that I'm overlooking that doesn't allow features &amp;amp; attachments to be downloaded with a query?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/396609_pastedImage_1.png" style="width: 620px; height: 530px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 15:28:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33917#M1698</guid>
      <dc:creator>ChrisKemmerer</dc:creator>
      <dc:date>2018-02-14T15:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33918#M1699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using these for LayerQueries;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{"4":{"where":"TEAM='1'"}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you need to use single quotes (' ') to enter values for where clause. Doesn't matter if it is Numeric or string field. I tried the same on my service and I could download the attachments.&lt;/P&gt;&lt;P&gt;1. Data tab of service&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/396626_Data tab.png" style="width: 620px; height: 187px;" /&gt;&lt;/P&gt;&lt;P&gt;2. Query: {"0":{"where":"NUMBER='100'"}}&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/396627_CreateReplica.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Please let me know if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Hemant A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 18:16:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33918#M1699</guid>
      <dc:creator>HemantAngarkar</dc:creator>
      <dc:date>2018-02-14T18:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33919#M1700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hemant, thank you so much.&amp;nbsp; The query string work flawlessly.&amp;nbsp; Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 18:32:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33919#M1700</guid>
      <dc:creator>ChrisKemmerer</dc:creator>
      <dc:date>2018-02-14T18:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33920#M1701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the multiple replies.&amp;nbsp; How would you string together the query if you wanted to pull Team 1's data from multiple layers?&amp;nbsp; &amp;nbsp;Lets say layers 4 &amp;amp; 7?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 18:39:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33920#M1701</guid>
      <dc:creator>ChrisKemmerer</dc:creator>
      <dc:date>2018-02-14T18:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33921#M1702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You would add it to the original line, but keep it inside that first bracket. Look at this example here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax: layerQueries={ Layer_or_tableID1 : {"where":"attribute query" , "useGeometry" : true | false, "includeRelated" : true | false}, Layer_or_tableID2: {.}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/rest/services-reference/create-replica.htm" title="https://developers.arcgis.com/rest/services-reference/create-replica.htm"&gt;Create Replica—ArcGIS REST API: Services Directory | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I took the first example you posted in this thread and corrected it, it would look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;{"0":{"where":"Project_Number='842'"},&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;"1":{"where":"Project_Number='842'"},&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;"2":{"where":"Project_Number='842'"},&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;"3":{"where":"Project_Number='842'"}}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 21:32:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33921#M1702</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-02-14T21:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33922#M1703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had too many brackets in the response above. Just fixed it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 21:41:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33922#M1703</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-02-14T21:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33923#M1704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Supriya, many thanks.&amp;nbsp; Worked like a charm!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 21:53:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/33923#M1704</guid>
      <dc:creator>ChrisKemmerer</dc:creator>
      <dc:date>2018-02-14T21:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/1199882#M47262</link>
      <description>&lt;P&gt;What if you have a couple values you want to query for, do we use some sort of OR statement.&amp;nbsp; Using your example, what if i wanted to query "842, 845, 895"?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 15:43:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/1199882#M47262</guid>
      <dc:creator>GaryWorley1</dc:creator>
      <dc:date>2022-08-05T15:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Layer Query</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/1199891#M47263</link>
      <description>&lt;P&gt;Figured this out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;•{"0":{"where":"&lt;SPAN&gt;Project_Number=842&lt;/SPAN&gt;'", "where":"&lt;SPAN&gt;Project_Number=845&lt;/SPAN&gt;'", "where":"&lt;SPAN&gt;Project_Number=895&lt;/SPAN&gt;'"}}&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 15:56:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-layer-query/m-p/1199891#M47263</guid>
      <dc:creator>GaryWorley1</dc:creator>
      <dc:date>2022-08-05T15:56:23Z</dc:date>
    </item>
  </channel>
</rss>

