Skip to main content Skip to complementary content

Creating a context variable

About this task

To be able to choose a database connection dynamically at runtime, we need to define a context variable, which will then be configure it in the Dynamic settings of the database input component.


  1. In the Context view, click the [+] button to add a row in the table, click in the Name field and enter a name for the variable, myConnection in this example.
  2. From the Type list field, select List Of Value.
  3. Click in the Value field and then click the button that appears in the field to open the Configure value of list dialog box.
  4. In the Configure value of list dialog box, click the New... button to open the New Value dialog box, and enter the name of one of the connection components in the text field, tMysqlConnection_1 in this example. Then click OK to close the dialog box.
    Repeat this step to specify the other connection component name as another list item, tMysqlConnection_2 in this example.
    When done, click OK to close the Configure Values dialog box.
  5. Select the check box next to the variable value field, and fill the Prompt field with the message you want to display at runtime, Select a connection component: in this example.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!