---
sourceDocument: Australia ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/servicenow-platform

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Switch workflow activity

# Switch workflow activity {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 Minute Lesedauer

The Switch activity checks if the value of a passed field or variable is equivalent to one of several case values.{#r_Switch__wf-switch-activity-shortdesc}
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.  
Hinweis:  
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.{#r_Switch__table_uml_1qt_jp__entry__2}

| 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. {#r_Switch__ul_twc_krt_jp} |
[Tabelle : 1. Switch activity input variables]

{#r_Switch__table_uml_1qt_jp}

## States

The activity state tells the workflow engine what to do with the activity.{#r_Switch__table_wvy_pqt_jp__entry__2}

| State | Description |
|-|-|
| Executing | The workflow engine knows to start the onExecute function of the activity. |
| Waiting | The workflow engine ignores the activity until a specific event to restart the activity is fired. |
| Finished | The activity finished running. See the result value for the outcome of the activity. |
| Cancelled | This activity, or the workflow that contains this activity, was canceled. |
| Error | A JavaScript error occurred. Review the logs for error details. |
[Tabelle : 2. Switch activity states]

{#r_Switch__table_wvy_pqt_jp}

## Example

You can create a switch activity that sets different field values on an incident based on the Assignment group of the incident record.Abbildung : 1. Switch activity example  
The Field selected is the incident Assigned to field.Abbildung : 2. Switch activity Field

If the value of the Assigned to field of the workflow-triggering
incident is Service Desk or Field Services,
the workflow populates values on the incident record before continuing. If the
Assigned to value is Hardware, the workflow
continues without populating any field values.  
Condition type (Standard, Else, or Error) is used. For more information, see [Manage workflow activity conditions](https://servicenow-prod.fluidtopics.net/Lg_dCCUML7YfXuCKSiIurQ#t_ManageActivityConditions "Activities contain default conditions that determine which transitions are followed.").Abbildung : 3. Hardware group condition

