Skip to main content

FieldLogs

Component
Component.png

The Component element enables you to embed a different Template within the current Template.

You can add the Component element to embed a Template to the main Template.

To add a Component:

  1. Click or drag the Component element from the Element Panel.

    component1.png
  2. A blank Component element appears in the Workspace Pane.

    component2.png

Setting up a Component includes the following actions:

  • Selecting the Template

  • Selecting the Target version of the Template

  • Selecting the Behavior

To set up the Component:

  1. Click Select Template in the Step Information Editor.

    SelectTemplate.png

    The Select Template dialog appears.

    Select_Template_dialog.png

    Templates under the following categories can be added as a Component:

    ThreeCategories.png
    • Published Templates

    • Bookmarks

    • Private Templates (not recommended)

    You can also use the search and filter options available to narrow down your search further.

    Filters.png
  2. Select the required Template from the list.

    TemplateSelected.png
  3. Select the Target version of the Component Template.

    TargetVersion.png

    You can select a specific version (1.0.0) or the version family (1.x.x or 1.0.x).

    The following options are available:

    • Current Version: This option ensures that the Current Version is always chosen. In the example above, the Current Version is 1.0.0. Whenever the Current Version of the Template changes, it is automatically reflected in the Target version.

    • Medium Version (1.x.x): When you select, 1.x.x, for every medium version increment of the Template (1.1.0, 1.1.1, 1.1.2.....1.2.0, 1.2.1, 1.2.2, .....1.3.0, 1.3.1, 1.3.2,...), the Component Template is automatically updated in the main Template.

    • Minor Version (1.0.x): When you select 1.0.x, for every minor version increment of the Template (1.0.1, 1.0.2, 1.0.3, 1.0.4,...), the Component Template is automatically updated in the main Template.

      Warning

      When you select a version family, the Component is not automatically updated for major version updates of the Template (1.0.0, 2.0.0, 3.0.0,...).

      For example, if it is linked to a family version 1.x.x and a new version 2.0.0 is available, the Component Template does not get updated automatically.

    • Specific Version: When you select a specific version, the selected version of the Template is used in the Component. In the below example, the specific version 1.0.0 is used. Even when newer versions of the Template (2.0.0, 3.0.0,...) are available, the version used in the Component still remains as 1.0.0.

      SpecificVersion.png

    Note

    The Target version dropdown is not available for Private Templates.

  4. Click Select.

    ClickSelect.png

    The Component Template is added to the main Template.

    CompTempAdded.png
  5. [Optional] Click Select another Template to change the selected Component Template.

  6. Select a Behavior for the Component Template.

    SelectBehavior.png

    There are four options available as highlighted in the image above:

    1. Replace On Run: The Component Template is launched at the same level as the main Template.

    2. Partial Replace On Run: Select some Steps of the selected Component Template.

    3. Insert On Validate: The embedded Component Template is launched as the child Steps.

    4. Partial Insert On Validate: Selected Steps of the Template are launched as a child Steps.

    Note

    Replace On Run is selected by default.

The Behavior determines how the embedded Template is executed at Run Time.

SelectBehavior.png

The different Behaviors are explained as follows:

  • Replace on Run: This option causes the embedded Component Template to be launched at the same level as the main Template Steps. The Steps of the Component will be executed as individual Steps and not as Child Steps.

    Replace_on_Run_.png
  • Partial Replace on Run: This option allows you to select some Component Template Steps to be executed.

    The example below highlights the Steps in the Component Template.

    Steps_in_Embedded_Component.png

    Select the Behavior option as Partial Replace on Run. You can select part of the Component Template as shown below.

    partial_replace_on_run.png
    partial_replace_on_run_steps.png

    The Clear button clears your selection and includes all the Steps of the Component Template.

    click_clear_.png

    Note

    When a Child Step is selected, corresponding Parent Step is also selected.

    When a Parent Step is selected, the associated child Step(s) are also selected.

    The selected Steps are displayed in the Workspace Pane and the Execution Preview of the Template as shown below.

    view_of_the_component_template.png

    During Runtime, only the selected Steps for the Behavior Partial Replace on Run are executed.

    execution_partial_replace_on_run.png
  • Insert on Validate: This option causes the embedded Template to be run as a child Step.

    When this option is selected, a text box Insert On Validate text appears. Selecting the HTML option enables advanced text formatting capabilities.

    HTML.png

    The text entered appears on the Component Step as shown.

    text_insert_on_validate.png

    At Run Time, the Step Execute Template button is displayed. This allows you to execute the Component Template.

    Execute_Template.png

    The embedded Template is launched as a child Step. The Steps of the embedded Component are displayed as the Child Steps of the main Template.

    embedded_template_as_child.png
  • Partial Insert on Validate: This option causes the selected section of the Template to be run as a child Step of the Template.

    behavior_partial_insert_on_validate.png

    Select part of the Component Template as shown in the example below.

    Selected_Steps_for_Partial_insert_on_Validate.png

    Click Execute Template to execute the Steps selected from the Component.

    execute_template_partial_insert_on_validate.png

    During Runtime, only the selected Steps for the Behavior Partial Insert on Validate are executed.

    partial_Insert_on_validate_-_execution.png

    Note

    Execute Template is a button that appears when Behavior is selected as Insert on Validate or Partial Insert on Validate.

    There are some features that can be performed on the Component.

Only Templates can be child Steps of a Component.

Note

You cannot link a part of a Template to a Component.

Warning

Using only the Published Template embedded within a Component element is recommended. A Template with an empty Component element cannot be saved.