Route by Expressions

Available in real-time analytics.

The Route by Expressions tool routes a record to one of the several destinations or outputs based on specified conditions. This tool evaluates a record against sequential ArcGIS Arcade expressions to a record similar to the if-else statement in a programming language. Each record is evaluated by the specified conditions. Records that a condition evaluates as true are retained and sent to that output.

Example

The following is an example use case for the tool:

A GIS analyst uses the Route by Expressions tool in a real-time analytic to route incoming records to different processing paths based on the value of the $feature.VehicleType condition. For example, records with VehicleType == "Airplane" are routed to an airplane-specific output, while those with VehicleType == "Train" or VehicleType == "Automobile" follow their respective paths. Records that do not match any defined condition are discarded if the Otherwise parameter is not turned on.

Usage notes

Keep the following in mind when working with the tool:

  • The Route by Expressions tool has a single input pipeline and multiple variable quantity pipeline outlet.
  • The maximum number of routes that can be connected is 10.
  • The Route by Expressions tool requires at least one conditional statement to work.
  • The Route by Expressions tool routes a record by defining Arcade expressions.
  • The Route by Expressions tool prioritizes one record at a time, in serial order, from the top (first) to the bottom (last).
  • If a record does not meet any of the specified conditions, and the Otherwise parameter is not specified, the record is dropped and is not processed.

Parameters

The following are the parameters for the tool:

ParameterDescriptionData type
Expression

An attribute expression that evaluates records to filter the incoming data. The expression is configured in the Arcade expression builder, accessed by clicking the Configure an Arcade expression option. All records are evaluated. Records that result true are retained, and false results are discarded.

String

(Arcade expression)

Otherwise

If the Otherwise parameter is turned on, unmatched records are processed. If the Otherwise parameter is turned off, those unmatched records are discarded.

Boolean

Output pipelines

The Route by Expressions tool does not alter incoming records; the output layer contains the same fields and attribute values as the incoming records.