ArcGIS Online Layer Query

2492
12
Jump to solution
02-13-2018 09:51 AM
ChrisKemmerer
New Contributor II

I have a hosted FeatureLayer in a Webmap that contains multiple features for data collections that will be used across multiple projects.  I'd like to be able to pull down data and attachments from those layers using a layer query in the create replica wizard .  For this example I have layers 0-3, all layers have a common attribute, "Project_Number".  I would like to do something similar to the example below.  So far I have tested the first line, while it produces a url to download the data the replica creation fails.  Unfortunately it does not provide an error number, only that it failed.  Any insight would be greatly appreciated.

EXAMPLE:

{"0":{"where":"Project_Number=842"}}
{"1":{"where":"Project_Number=842"}}
{"2":{"where":"Project_Number=842"}}
{"3":{"where":"Project_Number=842"}}

CHECK REPLICA STATUS ERROR:

12 Replies
ChrisKemmerer
New Contributor II

Supriya, many thanks.  Worked like a charm!  

0 Kudos
GaryWorley1
New Contributor II

What if you have a couple values you want to query for, do we use some sort of OR statement.  Using your example, what if i wanted to query "842, 845, 895"?

0 Kudos
GaryWorley1
New Contributor II

Figured this out.

 

•{"0":{"where":"Project_Number=842'", "where":"Project_Number=845'", "where":"Project_Number=895'"}}

0 Kudos