Keyword Transform Document Step

Use the Keyword Transform Document step to replace keywords in a predefined template with values contained in local variables, in order to display dynamic data to users.

Figure shows the properties of the Keyword Transform Document customizer window. You map these keywords to variables. When the script runs, the current values of the local variables replace the keywords. You can load keyword definitions from a source document, or you can add each keyword manually.

Keyword Transform Document Customizer Window

The following table describes the properties of the Keyword Transform Document customizer window:

Property

Description

Keyword Template

An Expression that identifies a source template document.

Keywords (Names and Values)

Names of keywords with the value mapped to each in the source document.

Document

Variable that stores the resulting document.

To use the Keyword Transform Document customizer window to map keywords to local variables, do the following procedure:

Procedure

 Command or ActionPurpose
Step 1

From the Keyword Template drop-down menu, choose the variable that stores the source template document or enter the expression.

Step 2

Take one of the following actions:

  • To define a keyword manually, click Add. The Add Keyword dialog box appears.

  • In the Name field, enter an alphanumeric string to uniquely identify the purpose of the keyword. For example, if you are using a keyword to display the results of a database query, you might define a keyword named “QueryResult”.

  • In the Value drop-down menu, choose the variable you want to map to the keyword.

  • Click OK. The Add Keyword dialog box closes, and the keyword template name and value appear in their respective columns in the display list of the Keyword Transform Document customizer window. Repeat this procedure as needed to map all keywords to local variables.

  • To load keyword definitions from a file, click Import. The Importing Keyword Template dialog box appears.

  • In the Importing Keyword Template dialog box, browse to the file that contains the keywords you want to import, and then click Open.

    Keywords must be flagged by percentage signs in the source document (%keyword%).

    The Importing Keyword Template dialog box closes, and any words in the document that are enclosed by percentage signs are displayed in the Keyword column of the Keyword Transform Document customizer window.

(If you want to map imported keywords to local variables, select the keyword in the list box, and click Modify. The Keyword Mapping dialog box appears again. Follow the same procedure you used to add variables.)

Step 3

From the Document drop-down menu, choose the variable that stores the resulting document.

Step 4

Click OK.

The Keyword Transform Document customizer window closes, and the names of the Document and Source Document appear next to the Keyword Transform Document step icon in the Design pane of the Cisco Unified CCX  Editor.