Skip to main content

End If

Sophie avatar
Written by Sophie
Updated over 2 months ago

Definition and Usage

Marks the end of a conditional block. This command is used to indicate where a conditional statement (such as If, Else If, or Else) terminates in the workflow. It serves as a closing delimiter for conditional logic structures.


Parameter Values

Input parameters

This action does not require any input parameters.

Variables produced

This action doesn't produce any variables.


Using Variables in Conditions

While the End if command itself doesn't use variables, it works in conjunction with conditional commands (If, Else If, Else) that typically evaluate variables as part of their conditions.


Notes

  • Every conditional block started with an "If" command must be closed with an "End if" command.

  • The "End if" command must be placed after all related "Else if" and "Else" commands in the conditional structure.

  • Proper nesting of conditional blocks is important for workflow execution. Each "If" statement should have a corresponding "End if" statement.

  • Conditional blocks can be nested within each other, but each level must have its own "End if" to properly close the block.

  • Octoparse AI uses the "End if" command to determine when to resume normal sequential execution after conditional processing.

Did this answer your question?