Append Data expressions
Expressions are used in the Append Data tool to calculate input layer fields using append layer field values. When you're not appending fields from the append layer, use expressions to specify how each feature will be populated. An Append Data expression should result in values of the same type as the field. Expression examples are included in the following sections.
The Append Data tool was introduced at 10.6.1 and can use Arcade expressions to append field values. Using Arcade, field names are formatted as $feature["field name"] or $feature.fieldname. The first option, $feature["field name"], is required when a field name includes a space. All examples below use this option.
Learn more about Arcade expressions
The following tools use Arcade expressions in GeoAnalytics Server:
Reconstruct Tracks—Buffer expressions.
Create Buffers—Buffer expressions.
Join Features—Join expressions.
Detect Incidents—Detect incidents using start and end expressions.
Calculate Field—Calculate field values.
Legacy:
The ArcGIS GeoAnalytics Server extension is being deprecated in ArcGIS Enterprise. The final release of GeoAnalytics Server was included with ArcGIS Enterprise 11.3. These tools are available through ArcGIS Enterprise 11.3 and earlier versions.
Mathematical operation and function examples
Expressions can mathematically process numbers. The following table shows examples of available operations.
Learn more about mathematical operations and functions in Arcade
|
Operator |
Explanation |
Example |
|---|---|---|
|
|
Returns the sum of a plus b. |
4.0 |
|
|
Returns the difference of a minus b. |
1.1 |
|
|
Returns the product of a times b. |
4.4 |
|
|
Returns the quotient of a divided by b. |
3.2 |
|
|
Returns the absolute (positive) value of a. |
1.5 |
|
|
Returns the natural logarithm (base E) of a. |
0 |
|
|
Returns the trigonometric sine of a. The input is assumed to be an angle in radians. |
1 |
|
|
Returns the trigonometric cosine of a. The input is assumed to be an angle in radians. |
1 |
|
|
Returns the tangent of a. The input is assumed to be an angle in radians. |
0 |
|
|
Returns the square root of a. |
3 |
|
|
Returns the lowest valued number between a and b. |
-3 |
|
|
Returns the highest valued number between a and b. |
1.5 |
|
|
Returns the input value if it's within the constraining bounds. If the value is less than the low value, it returns the low value. If the value is greater than the high value, it returns the high value. |
Example 1: Returns 0 if Example 2: Returns 6 if |
Text function examples
Append Data expressions can process text. The following table shows examples of available operations.
Learn more about text functions in Arcade
|
Operator |
Explanation |
Example |
Result |
|---|---|---|---|
|
|
Concatenates values together and returns a string.
|
|
GeoAnalytics is great! |
|
|
Finds a string within a string. Wildcards are not supported.
|
|
2 |
|
|
Makes a string lowercase.
|
|
geoanalytics |
Text example using find and lower.
find(("north"), lower("146NorthStreet"))
Date function examples
Append Data expressions can process dates. The following table shows examples of available operations. In Arcade, month values range from 0 (January) to 11 (December), day values from the 1st to the 31st, hour values from 0 (12:00 a.m.) to 23 (11:00 p.m.), minute and second values from 0 to 59, and millisecond values from 0 to 999. Arcade dates return time values for the GeoAnalytics Server location.
Learn more about date functions in Arcade
|
Operator |
Explanation |
Example |
Result |
|---|---|---|---|
|
|
Parses a value or set of values into a date string.
|
Example 1: Example 2: Example 3: |
Example 1: 20 Oct 2016 11:23:03 am Example 2: 14 Jan 2017 12:00:00 am Example 3: Returns the current time |
|
|
Subtracts two dates and returns the difference in the specified units.
|
Example 1: Example 2: |
Result will vary depending on when you run this command. Example 1: -20532129137 Example 2: -0.6546783768647119 |
|
|
Returns the year of the given date.
|
Example 1:
Example 2: |
Example 1: 2017 Example 2: 2012 |
Logical function examples
In addition to simple mathematical expressions, more advanced functions, shown in the following table, can be used to apply buffer expressions.
|
Function |
Explanation |
Example |
Result |
|---|---|---|---|
|
|
Returns one value if a condition evaluates to
|
|
Returns Returns the result of the second |
|
|
Evaluates a series of expressions in order until one evaluates to
|
|
If |
|
|
Evaluates an expression and compares its value with subsequent parameters. If the expression matches, it returns the next parameter value. If none match, there is the option for the last parameter to be a default return value.
|
|
Compares equality between the conditional val |
Conditional operators
Conditional statements can use the following operators:
|
Operator |
Explanation |
Example |
Results |
|---|---|---|---|
|
|
a is greater than b a is less than b |
|
False |
|
|
a is greater than or equal to b a is less than or equal to b |
|
True |
|
|
a is not equal to b |
|
True |
|
|
a is equal to b |
|
True |
|
|
Condition 1 or condition 2 is met. |
|
True |
|
|
Condition 1 and condition 2 are met. |
|
False |