Defining Template Variables

To replicate worklists, use the Template Variables (WL_TEMPLATE_VAR) component.

This section describes how to define template variables.

To access the Define Template Variables page, select PeopleTools, Workflow, Notifications, Template Variables, Define Template Variables.

Image: Define Template Variables page

This example illustrates the fields and controls on the Define Template Variables page.

Define Template Variables page

Field or Control

Definition

Add a Component Data Variable

Click to add a component data variable to the template. Click Edit to specify information about the variable.

Add a Component URL Variable

Click to add a component URL variable to the template. Click Edit to specify information about the variable.

Add an External URL Variable

Click to add an external URL variable to the template. Click Edit to specify information about the variable.

Note: Notification template variables do not indicate the true order of the variables. The order of template variables is determined by the sequence of the variables specified in the message text on the Define Template page. If the sequence of the variables in the message text is not in ascending, numerical order, then the template variables that you have declared must follow the order in the message text. If you do not synchronize the order of the template variables and the order that they appear in the message text, the system does not resolve the unordered variables.

To access the Component Data Variables page, select PeopleTools, Workflow, Notifications, Template Variables, Define Template Variables, Component Data Variables, Edit.

Image: Component Data Variables page

This example illustrates the fields and controls on the Component Data Variables page.

Component Data Variables page

Field or Control

Definition

Level

Select the level of the component buffer: Level 0 or Level 1.

Primary Record

Specify the record name where the data on the component buffer will be. This name might be the same as the primary record name within a scroll area or a grid.

Record

Specify the record name where the data on the component buffer will be. This name might be the same as the primary record name within a scroll area or a grid.

Field Name

Specify the name of the field where the data on the component buffer will be.

Field Label ID

Select the label that the user who creates the component template sees in the variable list.

Display Value

Select from the Display Values drop-down list box. The most common choice is Value, which is the data value of the field that you selected in Field Name. This is the only valid choice when using Component Templates from the Notify toolbar button.

If you are using component templates from custom PeopleCode, you have two additional options:

Formatted Value: The value that is used is exactly what the user sees on the page, but it is not necessarily the actual value that is stored in the field. For example, if the page field is displaying Xlat values, the template variable is populated with the Xlat value. If the page field shows a formatted date, the template variable is populated with the formatted date. If the page field shows a value from a prompt table, the template variable is populated with the value of the prompt table shown on the page.

Field Name: The template variable is populated with the long description of the field label that is selected in the Field Label ID field. If no field label exists, it uses the field name in the database table (for example, TRXTYPE).

How Display Values Are Used

The value format for component template variables is %C1, %C2, and so on.

If you specify the Display value as Value, then the variable will resolve to be the value that is stored in the database for that field. In the following screen, note that the value %C5 is assigned a label ID of Transaction Type and the display value is Value (values for this field can be IA, IS, OA, or OS, as defined in the translate table).

Image: Example of the Value display value

This example illustrates a sample display value of Value for the variable data source value %C5.

Example of the Value display value

If the Display Value is set to Formatted Value, then the variable will resolve to be the value that the end user sees on the page for that field.

Image: Example of the Displayed Text property

This example shows the Displayed Text property.

Example of the Displayed Text property

In this example, if the display value selected is Formatted Value and the field property displayed text is Xlat Short, then %C5 values could be InAsync, Insync and so on (as shown in the following Field Properties example).

Image: Example of Translate Values

This example shows sample translate values.

Example of Translate Values

If you set the display value to Field Name, then the variable will resolve to be the field label of that field. If no field label exists, then it will resolve to be the field name in the database table (for example, TRXTYPE).

Note: If the component template is activated by a Notify button (not using user-defined PeopleCode), the display values of Field Name and Formatted Value are not used (the variable will always resolve to the field Value).

To access the Component URL Variables page, select PeopleTools, Workflow, Notifications, Template Variables, Define Template Variables, Component URL Variables, Edit.

Image: Component URL Variables page

This example illustrates the fields and controls on the Component URL Variables page.

Component URL Variables page

The name format for component URL variables is %URLC1, %URLC2, and so on.

Field or Control

Definition

Use current portal

If using the current portal for a link, select Yes. If using another portal, select No and enter the portal name.

Use current node

If the current node contains the URL, select Yes. If using another node, activate No and enter the node name.

Use current page

If you want the URL to dynamically include the page that the user has open, select Yes. If you want the URL to include a specific page, select No and enter the page name.

Action

Specify the action for the URL variables: Update/Display, Add, or Correction.

Component Keys

If the component is in the current node, click the Reset Key Values button to populate the Field Name column based on the component metadata.

If the component is in another node, set the field names of the component keys yourself.

In the Value column, specify a reference to a component data variable that was defined on the Component Data Variables page (for example, %C1, %C2, or %C3).

If you do not specify the component key field names and values, the URL displays the Search Dialog page to the user.

To access the External URL Variables page, select PeopleTools, Workflow, Notifications, Template Variables, Define Template Variables, External URL Variables, Edit.

The name format for external URL variables is %URL1, %URL2, and so on.

Specify the complete URL, along with a description.