Go to a label

This custom action action transfers the package execution to the statement marked by the specified label. To mark a statement, you must first declare the label using the "Define a label" custom action. See an example below:

Property Name

Data Type

Description

LabelNameTLabelName (String)

Identifies the label the script will jump to.
A label name can be any valid identifier or any numeral between 0 and 9999, like LABEL1, RETURN25, etc...

All labels must be declared with a "Define a label" custom action before they can be used with a Go To Label custom action.

Paquet Builder manages all label names using the Label Manager: this editor may be opened by clicking on the '...' button that appears when you edit the LabelName property:

Once you have opened the editor, you can select the name of the existing label in the list (labels must have been previously defined, remember) and press OK.

Example of using Go to label

On this screenshot you can see an example of the use of "Define a label"/"Go to a label" custom actions. We ask end users for their name and create a kind of loop: they will be prompted to enter their name until they answer a non-blank value.

This can be used to check values provided by users (folders, etc...), to jump to specific blocs of instructions when a condition is not met, etc...

Some restrictions you should know:

  • "Go to a label" custom actions should not be used too much: only for simple examples like the previous one.
  • Although you are allowed to do this, you should not jump to a label that is not in the same event as the "goto" action. Paquet Builder automatically adds internal actions that occur between the events: if you use incorrect jumps, this can have unpredictable effects.

  Paquet Builder Help - Copyright © G.D.G. Software. All rights reserved.