--- title: Switch workflow activity description: The Switch activity checks if the value of a passed field or variable is equivalent to one of several case values. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/build-workflows/workflow-activities/r\_Switch.html release: australia product: Workflow Activities classification: workflow-activities topic_type: reference last_updated: "2026-03-12" reading_time_minutes: 2 breadcrumb: [Condition Workflow activities, Workflow activities reference, Workflow activities, Classic Workflow, Build workflows] --- # Switch workflow activity The **Switch** activity checks if the value of a passed field or variable is equivalent to one of several case values. The switch activity behavior is similar to a switch statement in Java. When creating a switch activity, select a **Variable** or **Field** to check against activity conditions for a matching field value. When the value passed in this variable or field matches the value defined in the **Condition** field of the activity condition, the workflow progresses through that activity condition. **Note:** Condition activities run as the user whose actions match the conditions the workflow was waiting for and advances the workflow. ## Results The variable or field selected in the **Variable** or **Field** activity variable determines the possible result values. ## Input variables The following variables determine the behavior of the activity.
| Field | Description |
|---|---|
| Type | Select **Variable** or **Field** as the type of value to check against available conditions. This selection sets the label and available options for the other field. |
| Variable or Field | Select the source of the value compared against the switch activity conditions. The field label and available options depend on the **Type** selection. - **Variable:** select any service catalog variable. - **Field:** select any field from the **Table** defined in the workflow properties. |