Skip to main content

Break

The following table provides information regarding the 'Break' SFCodeBlock.

Break SFCodeBlock

CategoryProgramming
Category DescriptionProgramming Break allows you to interrupt the execution of a loop (For, For Each or While).
InputNone
ParametersNone
Pattern SupportNone
ReturnsNone
ConfigurationNone
Note

The 'Break' code block can only be used inside loop cycles; any other use is considered improper and SFHub raises an error when the analytic is saved.
Incorrectly used Break - error message

Tip

The 'Break' code block not interrupt a While code block in early versions of SFHub Studio. The suggested work-around is force the condition checked by the While cycle to false.

EXAMPLE: Proper use of Break

In this example, the 'For' loop in interrupted when a certain condition is verified by the 'If Then' SFCodeBlock.

Example of Break