Use runtime parameters for dynamic WHERE Clauses.

Runtime Parameters in the WHERE Clause Editor #

To create and assign runtime parameters, follow the steps below:

  1. In the main window of the component click [Edit Parameters]. The window “Edit Runtime Parameters” opens.
    dd-parameters
  2. Click [Add Scalar] to define scalar parameters to be used as placeholders for actual values.
    Click [Add List] to define list parameters that contain multiple values separated by commas e.g., 1,10 or “1”, “10”.
    The placeholders need to be populated with actual values at extraction runtime.
    Tip: Parameter0..-n is the default naming for the added parameter. You can enter a name of your choice.
  3. Click the drop-down menu (2) and assign one of the following data types to a parameter.
    The data types may correlate to SAP data types.
    • String: Can be used for any type of SAP selection field. List parameters are always of type String.
    • Number: Can be used for numeric SAP selection fields.
    • Flag: Can only be used for SAP selection fields, which require an ‘X’ (true) or a blank ‘‘ (false) as input value.
  4. Click [OK] (3) to confirm.
  5. Navigate to the WHERE clause tab in the main window of the extraction and open the WHERE clause editor.
  6. Add a new WHERE clause criteria that uses the [Default with Parameter] template.
  7. Click on the Parameter component. A drop-down list that displays all available parameters opens. Select a parameter from the list.
    WHERE-Clause-Builder-Example
  8. To test the WHERE clause, click [Load live Preview]. Provide parameter values when prompted.

Note: List parameters are not yet available. This feature will be available soon.

Create Runtime Parameters #

Follow the steps below to create runtime parameters:

  1. In the main window of the component click Edit parameters. The window “Edit Runtime Parameters” opens.
    Edit runtime parameters
  2. Click [Add Scalar] or [Add List] (1) to create a scalar or list parameter that can be used a placeholder for values. List parameters can contain multiple values separated by commas e.g., 1,10 or “1”, “10”. The placeholders need to be populated with actual values at runtime.
    Tip: Parameter0..-n is the default naming for the added parameter. You can enter a name of your choice.
    ODP Add parameters
  3. Click on the drop-down menu (2) and assign one of the following data types to a parameter. The data types can, but don’t have to correlate to SAP data types.
    String: This data type can be used for any type of SAP selection field.
    Integer / Number: This data type can be used for numeric SAP selection fields.
    Flag: This data type can only be used for SAP selection fields, which require an ‘X’ (true) or a blank ‘‘ (false) as input value.
  4. Click [OK] (3) to confirm.

The runtime parameters are now available in the component, e.g., for filters and selections.

How to Pass Values at Runtime #

Follow the steps below to replace runtime parameters with actual values at runtime:

  1. Create and assign runtime parameters in the Xtract component.
  2. Close the Xtract component.
  3. Define the input values for the runtime parameters (1), e.g., single values or lists.
    table-input
  4. Make sure that the data type of the input values match the data type of the corresponding runtime parameter.
  5. Make sure that the name of the input matches the name of the corresponding runtime parameter, e.g, the values of the input Parameter0 is automatically assigned to a runtime parameter by the same name.
  6. Connect the input to the Xtract component using the input anchor “P” (2).
  7. Run the workflow to test if the parameters are assigned correctly.

Note: Parameterization via input anchors is supported as of Xtract for Alteryx version 1.19. When using an older version of Xtract for Alteryx, parameterize Xtract components using batch macros, see Parameterizing via Batch Macros.