---
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


---

# If workflow activity

# If 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 If activity checks a condition or script to determine if a Yes or No transition should be taken.{#r_If__wf-if-activity-shortdesc}
If the workflow creator specifies both the Condition and the
Advanced script, both must evaluate successfully for activity to
take the Yes transition.

## Results

The workflow designer can assign a result value using activity.result from within the Script field on the activity record. By default, the result value of the activity is the final result of the condition or script specified. Possible result values are:

* Yes
* No
{#r_If__ul_llw_wpt_jp}

## Input variables

The following variables determine the behavior of the activity.  
Hinweis:  
Condition activities run as the user whose actions match the conditions the workflow was waiting for and advances the workflow.
{#r_If__table_uml_1qt_jp__entry__2}

| Field | Description |
|-|-|
| Condition | If specified and the current record matches the condition, the Yes transition is taken. |
| Advanced and Script | To specify a script, select the Advanced check box. You may then enter a script that is evaluated. If your script sets the variable answer to `yes`, then the Yes transition is taken. Otherwise, the No transition is taken. |
[Tabelle : 1. If activity input variables]

{#r_If__table_uml_1qt_jp}

## Conditions

The following conditions determine which transition comes after the activity.
{#r_If__table_nr5_kqt_jp__entry__2}

| Condition |   |
|-|-|
| Yes | Taken when the condition, if specified, matches and the Advanced script, if specified, returns yes. |
| No | Taken when either the condition does not match or the Advanced script, if specified, returns no. |
[Tabelle : 2. If activity conditions]

{#r_If__table_nr5_kqt_jp}

## States

The activity state tells the workflow engine what to do with the activity.{#r_If__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 activty, was canceled. |
| Error | A JavaScript error occurred. Review the logs for error details. |
[Tabelle : 3. If activity states]

{#r_If__table_wvy_pqt_jp}

