Questions tagged [definition-query]

A request that examines feature or tabular attributes based on user-selected criteria and displays only those features or records that satisfy the criteria.

Filter by
Sorted by
Tagged with
0
votes
1answer
46 views

Definition Queries for most recent date in ArcGIS Pro

I have a feature class containing sample results for locations that includes thousands of records. Many of these are overlapping and have the same location ID. I need to label each sample based on the ...
0
votes
1answer
30 views

Making definition query table not blue in ArcGIS Pro [closed]

I am new to ArcGIS Pro. I figured out a definition query but it's making the attribute table blue and it hurts my eyes. I would like definition query tables to be un-colored (white), but I want ...
2
votes
2answers
896 views

Writing Python Def Query for multiple layers [closed]

I have Three layers in a .mxd, all three layers have a common value I can use, but a different Label in each Layer. As an example, the Value I want to use is "100" In Layer A, the Value is in [Name] ...
1
vote
0answers
16 views

Linking Feature Classes between Two Different Map Frames so that Definition Queries in one Frame Apply to Another Frame

In ArcGIS Pro 2.4.1, would like to determine whether it is possible to link two identical feature classes, where feature class 1-1 is in map frame 1-1 and feature class 1-2 is in map frame 1-2. The ...
2
votes
1answer
195 views

Using min-max functions in definition queries of feature services

Using a feature service from ArcGIS Online, I would like to display a record wherein one of its attributes is the max of the entire records, but is unable to do so. If I am using a Feature Class from ...
0
votes
1answer
237 views

Definition query to display only part of layer that overlaps with specific polygon using ArcGIS Desktop

I have a very large roads data set and I would like to write a definition query that displays only the roads that are inside of a polygon. This would make my export to pdf a much smaller file size. I ...
3
votes
2answers
1k views

Why is Definition Query not returning any records?

I am currently working on a mapping project and only need 8 tenements out of many to appear. I have gone into the query builder to complete this and unfortunately it will not work. Into the builder a ...
1
vote
2answers
5k views

Creating Definition Query tool in ModelBuilder that uses in-line variable

I'm having trouble using an in line variable derived from the Parse Path tool in ArcGIS ModelBuilder to create a definition query for a layer file. I'm importing an xyz file to a feature class, and ...
1
vote
2answers
393 views

How to apply a layer definition with a spatial query to a Dynamic layer?

Using the ArcGIS Server JavaScript API, it's possible to specify an attribute query in the form of a layerDefinition against a Dynamic layer. For example, the following query will restrict the layer ...
1
vote
0answers
33 views

Setting up definition query to run through ModelBuilder on ArcMap?

I am trying to make a model that will symbolize data quickly, but wanted to see if a model could perform a definition query or multiple definition queries on a large data set. If this is possible, ...
0
votes
1answer
51 views

Filter layer by pasting in WHERE clause?

I have a web map in Portal that has the Web AppBuilder Filter widget. The map has a point layer in it called Work Orders. I would like to filter the work orders by pasting in a WHERE clause. The ...
4
votes
1answer
72 views

Not able to update the “ACTION” field

Currently I am working on a GIS project where I have to update a field in a layer with some values to get my work done. Because the manual efforts are time consuming hence I added a custom addin to my ...
2
votes
2answers
161 views

Definition Query - Length of Field

Is it possible to create a definition query that will return a subset of values based on a specific field length? I only want string values where length is less than or equal to 2 characters.
0
votes
0answers
98 views

Query returning multiple vehicle_ids when it should only return the top 1

Using ArcGIS Desktop 10.5.1 I have a point featureclass in an Microsoft SQL Server 2012 Enterprise Geodatabase (ArcGIS Server 10.5) that holds MDS (mobility ride share scooter) data. The feature ...
0
votes
1answer
90 views

Updating layer definition query using ArcPy? [closed]

I'm using ArcPy for some automation and I need to update the layer definition query multiple times while running the same script. I've only been able to find ways to update the layer definition ...
0
votes
0answers
38 views

How can I create a layer for each unique field item in a shapefile using Arcpy

#Introduction and imports import arcpy, string from arcpy import env #User Inputs: layer, field name, output workspace (optional) strTargetLayer = arcpy.GetParameterAsText(0) strFieldName = arcpy....
0
votes
0answers
34 views

Dynamic SQL Expression Parameter in Model Builder tool (Arcmap 10.3)

I have a working model in Arcmap 10.3 that creates a feature class data from CSV file, queries the data according to a SQL Expression, and then conducts many spatial joins. The model works as ...
1
vote
1answer
65 views

Definition query not updating [closed]

I have an ArcMap 10.3 MXD in which which I am trying to update the definition query of an enterprise geodatabase layer using Python: import arcpy, os, re from arcpy import env inmxd = r'C:\Temp\...
12
votes
3answers
2k views

Create Layer from Selected Features tool: How is the list of features stored?

In ArcGIS Desktop, there is a tool called Create Layer from Selected Features. Using this tool, I can convert a selection to a layer in ArcMap. It's my guess that there is a "list of features" that ...
3
votes
1answer
80 views

Applying Definition Query for multiple features using ArcPy?

I'm trying to apply the following code to extract features that contain these letters 'MW' within the field called 'CODE' for multiple layers. But I'm getting a SyntaxError for line 5 (defintion query)...
1
vote
1answer
447 views

Selecting multiple values from a string in ArcMap?

I have a text field containing values like "1A,2P,13,17,22,34". I want to select the values that I need by a definition query of a layer. For a single value worked using LIKE and % but I need to ...
-1
votes
1answer
160 views

Data Driven Map Book Using ArcGIS

I am trying to create a Map book using ArcGIS. I am known to Data driven pages which create pages with GRID by GRID. But I want to create a Map book with the districts of Bangladesh. In every page I ...
0
votes
1answer
59 views

Page definition query not turning layer on and off when driven by Definition Querried duplicate layer of index layer?

I am trying to have some labels turn on and off dynamically with the data driven page being displayed, but it is not working. First, I have a data driven index layer moving from map to map, called "...
0
votes
2answers
615 views

Creating new layers using ArcPy to define Definition Query for each field value? [closed]

I am trying to set multiple definition queries for one layer based on one field using python. ie. I have a City layer with a field that holds the city name. I want a copy of the layer in an MXD ...
2
votes
0answers
61 views

Create filter expression by selected elements?

Is it possible to automatically create a filter expression for the Query Builder by selected elements?
0
votes
0answers
40 views

Accessing Feature Service via ArcGIS REST API to Customize App in Operations Dashboard?

Beginner here Just learned how to construct url to access the feature services needed to build the customized app I envision in Operations Dashboard, but struggling to find a tutorial/resources ...
0
votes
2answers
95 views

Attribute table in QGIS showing a subset of desired features after query builder

I'm working with some OSM data in QGIS and I want to show only those points that are schools. So I go into query builder and enter "other_tags" LIKE '%"amenity"=>"school"%'. This narrows down my ...
0
votes
1answer
175 views

Using Page Definition Query?

I'm looking to use data driven pages to automate some of my workflow, and I'm almost there for the most part. I have a layer (Chainage - 200m markers along a watercourse) that I'm trying to perform a ...
1
vote
1answer
36 views

Using ArcMap to Query and Display Data? [closed]

I have a large amount of data in Excel spreadsheets. I have been converting that data into Attribute tables to use in ArcMap. The data includes: names of locations geo-location descriptions of each ...
1
vote
0answers
31 views

setFilterExpression not giving results because of space?

I am trying to select data based on QgsVectorLayer() getting it's features from layer.getFeatures().next() method. When I pass expression in that using QgsFeatureRequest().setFilterExpression(...
2
votes
1answer
266 views

Adding Not Operator in Definition Query of ArcGIS Pro?

I am using ArcGIS Pro 2.2 I want to apply a definition query saying NOT (name contains 'road%') apparently there is no option to add Not Operator in query neither there seem to be any option ...
4
votes
1answer
137 views

Debugging definition queries in ArcMap?

Troubleshooting and debugging ArcMap defintion queries that go beyond a basic single statement can be very frustrating. Statements that work on their own easily break when combined. How can this pain ...
3
votes
2answers
415 views

Using PostGIS functions in ArcGIS Desktop for Layer Definition Query?

I am connecting ArcGIS Desktop 10.2 to Postgis 2.0.3 with PostgreSQL 9.2.4. No SDE. I can load data with no problems and access the data in ArcMap. However I can't seem to use PostGIS functions within ...
3
votes
1answer
1k views

Using output statistics in ArcGIS REST API query?

I am using an API to pull in some Web Mapping Service Layer data to my script. The API query has a max count limit of 1000 on returned features per request. There are 2 attributes I am trying to use ...
-1
votes
1answer
66 views

Leaving cities with less than X number of observation in ArcGIS for Desktop?

I would like to generate some quintile maps based on the averaged sentiment score in each city in the US. However, not all the city has the same number of data point. How can I tell ArcGIS to show ...
0
votes
2answers
47 views

Data Driven Pages Optimization for the same FC referenced twice

I have a feature class that I am referencing twice in my map, for "active" features that are "the subject" of the map page as a Feature Layer second Feature Layer that is grayed out/"inactive" on ...
2
votes
1answer
2k views

Can ArcGIS 10.1 use SQL on Definition Query to select minimum value?

In ArcGIS 10.1 I am trying to do a Definition Query that will select the records that are the min values from a table. I try a lot of type of query like and it still not working. Name table is ...
2
votes
3answers
301 views

ArcGIS Desktop 10.3 - definition query to exclude integers starting with certain values

I have an integer field in a polygon shapefile that I want to definition query out everything number that beings with 18. These numbers aren't sequential and are of any length, ie I want to exclude ...
0
votes
1answer
265 views

ArcMap definition query for a string contained in a longer string not working

I am trying to query records that contain a specific string within a longer string of an attribute table but it is not working. There are a few extra details to the situation. DQ is going onto a ...
0
votes
1answer
75 views

Joining a queried table to a feature class

I have a table in a geodatabase that I would like to join to a feature class. The table contains well locations with multiple sample dates and associated data, however, I am only interested in sample ...
-1
votes
1answer
166 views

In ArcMap my Definition Query is removing all records but categorizing on symbology works properly

I have a definition query to filter an attribute in a feature class, the Attribute is joined to the dataset being queried from an Access MDB and is data type SHORT, the values it contains are 1,0, &...
4
votes
1answer
18k views

Definition Query to exclude certain values and return remaining values

I have been trying to create a Definition query to symbolize a set of water features. I cannot edit the .shp file and I want to exclude a multiple values. I have tried using NOT but have had no luck. ...
0
votes
1answer
559 views

Definition Query for records created in the past 30 days in and SQL SDE?

I am stumped as to how to get this to work in ArcMap... I have records being created ever day, and would like to be able to show records on a map that have been created within the last 2 days based ...
0
votes
1answer
119 views

Creating queries in Portal for ArcGIS that do not have to be predefined?

I am trying to figure out if there is a way to make a query widget in Portal for ArcGIS that is more free form. I want to know if there is a way a user can type in queries that are not predefined. Or ...
1
vote
1answer
239 views

PyQGIS QgsVectorLayer.uniqueValues() override active object filtering

This code snippet gives me the unique values for a vector layers attribute called myfieldname l = iface.activeLayer() attrIndex = l.fieldNameIndex('myfieldname') uniValues = l.uniqueValues(attrIndex) ...
1
vote
2answers
1k views

Using ArcGIS definition query for dates?

My attribute table contains a Start date in m/dd/yyyy format. I would like to build a query that only shows data from current month forward. Does anyone know how to build a query or expression for ...
-1
votes
1answer
321 views

Updating Page Definition Queries with Python and data driven pages?

I have several annotation features that each have a tileID field. I would like to be able to enable the page definition query and select the correct Page Name Field to match the tileID field in all of ...
0
votes
0answers
164 views

Creating script tool for definition query using user input

I have a map document with about 10 layers that I would like to create a query definition script tool to use that takes a user input as a parameter and then executes the tool. The script looks like ...
1
vote
1answer
226 views

Why does my modulo expression return no results?

I have a big set of contour lines with 5 m and 10 m stepping from an ArcGIS File Geodatabase (wasn't a shapefile, as previously stated). From time to time I need to modulo out the 5 m lines in the ...
3
votes
0answers
202 views

Current date in query builder Qgis

I'm trying to put a query on a vectorlayer with the current date. The following code works, but I want the current date to be dynamic: cast ("Starttijdstip" as character) < '2018/03/01' AND '...