Example of Token Evaluation and Validation by Command with Delimited Output

The validation functionality can be extended to include field-dependent token evaluation. You can configure validations to change dynamically, depending on the client-side value specified in another field.

To use field dependent token evaluation, you must configure a validation with an object type, request type, report type, project template, or user data definition.

Sample set up of and object type using field-dependent tokens:

  1. Generate a validation and set the following parameters:

    1. Name: demo_client_token_parsing

    2. Component Type: Auto Complete List

    3. Validated By: Command With Delimited Output

    4. Data Delimiter: | (bar)

    5. Command

      • Command: Validate_from_file

      • Steps

        ksc_connect_source_server SOURCE_ENV="Your Env"
        ksc_capture_output cat [P.P_FILENAME]
        ksc_exit
      • When called, this validation connects to an environment called "Your Env" and retrieves data from a file specified by the token P_FILENAME. The file resides in the directory specified in the Base Path in the Environment window.

  2. Generate an object type named token_parsing_demo.

    1. Generate a new field with the following parameter settings:

      • Name: Filename

      • Token: P_FILENAME

      • Validation: Text Field - 40

    2. Generate a new field with the following parameter settings:

  3. To return values in the auto-complete, generate a file named parse_test1.txt in the directory specified in the Base Path in the Environment Detail of "Your Env" environment that contains the following:

    DELIMITED_TEXT1|Parameter 1
    DELIMITED_TEXT2|Parameter 2
    DELIMITED_TEXT3|Parameter 3
    DELIMITED_TEXT4|Parameter 4

The object type token_parsing_demo can now use this token evaluation.

To test the configuration sample:

  1. From the PPM Workbench shortcut bar, select Deployment Mgmt > Packages.

    The Packages Workbench opens.

  2. Open a new package.

  3. In the Package window, select a workflow, and click New Line.

    The Add Line window opens.

  4. In the Object Type field, select token_parsing_demo.

    The Filename and AutoComp fields are displayed.

  5. In the Filename field, type parse_test1.txt.

  6. In the AutoComp field, select parse_test1.txt.