About Expressions
An expression is a way to specify conditions. Use the Expression Editor to create expressions that map properties from a data store to your model, filter or select features, calculate or convert data values, or specify criteria for styling and labeling.
Click
to open the Expression Editor. See To create an expression for more information. Also see Creating Expressions - Reference for help with any expression element.
This table describes ways to use expressions in more detail.
Filter Data |
- Filter data during import
Filter data for a data source during and after import using the conditions that you define. Combine properties in the original data store to map to properties in the model, and format entries for the Data Table with Source Filter.
- Filter by location
Draw a geospatial area on your model to be used in an expression.
- Filter feature classes
Create and work with a subset of a feature class.
|
Select Features |
- Select features based on location
Find and select only features in your model that meet a set of spatial conditions you define.
- Select features based on properties
Find and select only features in your model that meet a set of property conditions you define. For example, to select all features that specify a positive elevation offset, use the expression: ELEVATION_OFFSET > 0.
Note: The results of a Select By Filter expression must be a Boolean value.
|
Convert Data |
- Convert Data
Convert data values from one data type to another and then evaluate the result of the conversion. Convert numeric or text strings to a particular numeric or text format. Change the format or type of a string property. For example, if a data store keeps date values as text, you can convert these values to date strings. Then you can use Date Functions on the date strings. You can also convert a text string to a date format and add days or months to the resulting date.
|
Calculate Values |
- Calculate Values
Calculate a new value based on existing values. For example, calculate the area of a polygon or the length of a linear feature, round a value up or down, find the square root of a value, use trigonometric functions, or determine the remainder of a number after it is divided by another number. Find the average, mean, or median of a set of values.
Note: The Values Pane is not available when creating calculations. You cannot view or insert property values from original data sources when creating calculations.
|
Evaluate Properties |
|
Define Style Rules |
|
Format Numeric and Text Strings |
- Format Text Strings with Text Expressions
With text expressions, you can analyze and manipulate text strings. For example, use a text expression to replace one set of characters with another. Complex text expressions can also concatenate (combine) multiple properties into a single entry. For example, create an entry for theFull_Name property with the expression: "Concat (First_Name, ' ', Last_Name)".
- Format Numeric Strings with Numeric Expressions
Numeric expressions operate only on numeric values. They use math functions, with which you can analyze and manipulate numeric strings. For example, round off repair costs to the next highest dollar with the expression: Ceil (REPAIR_COST).
|