Validating by commands with delimited or fixed-width output can be used to get data from an alternate source, and that data can be used to populate an auto-complete. This functionality provides additional flexibility when designing auto-completes.
Many enterprises need to use alternate sources of data within their applications. Examples of these sources are a flat file, an alternate database source, or output from a command line execution. Special commands may be used with these alternate data sources, in the context of a validation, to provide a list of values.
To configure a validation by command with delimited or fixed-width output:
Open a new or existing validation, see Configuring Validations.
In the Component Type field, select Auto Complete List.
The fields in the Validation window change dynamically, depending on your selection.
In the Validated By field, select Command With Delimited Output or Command With Fixed-Width Output.
For Selection mode, select one of the following:
Type characters and if the list is not automatically filtered, then type the Tab key. The selection window opens and lists entries that begin with the specified characters.
Type characters, and if the list is not automatically filtered, then type the Tab key. The selection window opens and lists entries that contain the specified character string. This is the same behavior as a wild card search, which uses the% character at the beginning of the search text.
In the Expected list length field, select one of the following:
Auto-completes configured as short lists load all values when the window is opened. This can adversely affect performance.
Auto-completes configured as long lists only load a limited set of values when the window is opened. By default, 50 results are shown per page. End users can page through the results or further limit the results by specifying text in one of the available filter fields at the top of the page.
If you selected a long list, in the Number of results per page, indicate the number of results you want displayed on each page.
Click New Command.
The New Command window opens.
Complete the fields described in the following table.
Specific conditions under which the command steps are to be executed. This step is optional. For more information, see .
Command description. This step is optional. For more information, see .
Length of time (in minutes) to run the command before stopping. This setting is useful if a command hangs or takes too long to execute.
Use the Yes and No option buttons to enable and disable the command.
Provide at least one command step.
These can include PPM special commands. Include the special command
ksc_capture_output, which captures and parses the delimited command output. If you place the
ksc_capture_outputspecial command between the
ksc_disconnectcommands, the command is run on the remote system. Otherwise, the command is run locally on the PPM Server (like
Click Tokens to open the Token Builder window and find a token to add to the command step. For information about tokens, see Using Tokens.
Click Special Cmd to open the Special Command Builder and find a special command to add to a command step. For information about special commands, see Using Special Commands.
To show or hide a Descriptions field in the Steps field, click Show Desc or Hide Desc.
Click OK, Add or Cancel.
For delimited data, in the Data Delimiter field, indicate the character or key by which the file is separated into the validation columns.
You can also define headers for the selected columns. These column headers are used in the window that opens when a value is selected from an auto-complete. To define a new header, click New in the Column Header section. If you do not define a column header for each column in a command, a default header is used.
Under the Column Headers table, click New.
Specify values for the following:
Column name to display in the auto-complete window.
Determines whether or not the column is visible. The first column is never visible and the second column is always visible.
The following example uses a comma as the delimiter and includes the validation values red, blue, and green. The script places the validations into the
newfile.txt file, and then uses the special command
ksc_capture_output to process the text in the file.
ksc_begin_script [AS.PKG_TRANSFER_PATH]newfile.txt red,red blue,blue green,green ksc_end_script ksc_capture_output cat [AS.PKG_TRANSFER_PATH]newfile.txt
The following example includes the validations red, blue, and green. The column width of the red, green, and blue columns is set to 6. The script places the validations into the
ksc_begin_script [AS.PKG_TRANSFER_PATH]newfile.txt red red blue blue green green ksc_end_script ksc_capture_output cat [AS.PKG_TRANSFER_PATH]newfile.txt