Creating Rules with Actions and Conditions
To create rules with actions and conditions, use the Actions and Conditions (TL_ACTION and TL_CONDITIONS) components.
When you define actions and conditions in Time and Labor, you define them independently of one another, which enables you to reuse the same actions or conditions in more than one rule without having to define them again. Using actions and conditions does not require a mastery of SQL.
This section discusses how to create rules with actions and conditions.
Page Name |
Definition Name |
Usage |
---|---|---|
TL_ACTION_PNL1 |
Define or view general information for a SQL action. Specify the action to perform (delete, insert, or update) and identify the target record (table) to perform the action on. If action type is insert (from another table), specify the source record (table). |
|
TL_ACTION_PNL2 |
Create the text of your SQL action. |
|
TL_CONDITION2_PNL |
Define or view general information for a SQL condition and create the text of a SQL condition. |
Use the Action Header page (TL_ACTION_PNL1) to define or view general information for a SQL action.
Specify the action to perform (delete, insert, or update) and identify the target record (table) to perform the action on. If action type is insert (from another table), specify the source record (table).
Navigation:
This example illustrates the fields and controls on the Action Header page. You can find definitions for the fields and controls later on this page.

Some fields on the Action Header page always appear; others appear only in connection with the action type of Insert. These elements always appear:
Field or Control |
Description |
---|---|
Save As ... |
Select to duplicate an action by giving it a different name, or create an action that is similar to an existing action or a PeopleSoft-delivered action. This function replaces the Copy Actions page from previous releases of PeopleSoft Time and Labor. Important! When you use the Save As... button to create the copy, the system saves the source object with any modifications prior to selecting the Save As ... button. You should always create the copy first, and then make changes to the object. Note: You cannot modify individual actions or conditions after they are part of a rule and the system is in production (that is, after Production Environment is selected on the Installation Options page). |
Action Type |
Specify the SQL action to perform. Valid values are:
|
Core Component |
This field is display-only and system-maintained. Several SQL objects are delivered with the Time and Labor application. These objects are used in templates. If the object you are viewing was created by the PeopleSoft system, this check box is selected; if you created this object, this check box is cleared. You cannot modify or save this object, but you can copy it and modify the copy. |
Target Record (Table) Name |
Enter the record (table) you want to delete, update, or perform the insert on. The records contained in the prompt table are those made available for deletion, insertion, or updating on the Working Tables page. |
Explanation |
Use this expression text box to explain the action you are defining. |
These fields appear only if you select an action type of Insert:
Field or Control |
Description |
---|---|
Source Record (Table) Name |
The source record (table) from which you are taking data to perform the insert. |
Insert Source Indicator |
The field that enables you to specify the exact source of the data used to perform the Insert. Valid values are: From Another Table: If you select this value, the Source Record (Table) Name field is available. Enter the source record from which you are taking data to perform the insert. Go to the Action Details pages to specify the source of the data to enter into the Target Record (Table) fields. From a List of Values: If you select this value, the Source Record (Table) Name field is unavailable. Enter the target record into which you are inserting the list of values. To define the exact values to insert in each field contained in this record, go to the Action Details pages. |
Note: Click the links at the bottom of this page to access other pages in this component.
Use the Action Detail page (TL_ACTION_PNL2) to create the text of your SQL action.
Navigation:
This example illustrates the fields and controls on the Action Detail page. You can find definitions for the fields and controls later on this page.

If the action type on the Action Header page is Update or Insert, provide additional information about the fields in the target record (table) on which you are performing the action. For example, answer these questions: what fields are you updating or inserting data into and what are the sources (and types) of data that you are using to perform the insert or update?
The specific information to enter depends on the type of action specified on the Action Header page and the value entered in the Insert Source Indicator field.
Enter the action details on the Action Details 1 and Action Details 2 tabbed grids. These grids work in combination; when you select a value on the Action Details 1 grid, related fields become available on the Action Details 2 grid.
Note: The Action Detail page is not available if your action type is Delete. Because you are deleting the contents of an entire record (table), do not enter field-level information on the Action Detail page.
Field or Control |
Description |
---|---|
Field Name |
|
Source Field Indicator |
|
Action Detail
Field or Control |
Description |
---|---|
Field Name |
This column contains the fields in the target record (table) that you are updating or performing the insert action on.
|
This page displays additional fields, depending on the source field indicator selected on the Action Detail 1 page:
Field or Control |
Description |
---|---|
Constant |
Displays if the source field indicator is Constant. Enter the constant to use for the update or insert. |
|
Displays if the source field indicator is Expression. Click the button to access the Expression Text field. |
Meta-SQL |
Displays if the source field indicator is Meta-SQL. Enter the meta-SQL to use for the insert or update action. |
|
Displays if the source field indicator is Meta-SQL. Click the button to set parameters within the meta-SQL. |
SRC FieldName (source fieldname) |
The system displays this field if the source field indicator is Rec Field (Record.Field) and the action type is Update or Insert - From Another Record.
|
State Variable |
The system displays this field if the source field indicator is State Var(state variable). Enter the state variable from any Time and Labor state record to use as the source of the update or insert. |
Use the Conditions page (TL_CONDITION2_PNL) to define or view general information for a SQL condition and create the text of a SQL condition.
Navigation:
This example illustrates the fields and controls on the Conditions page. You can find definitions for the fields and controls later on this page.

Note: Template-built rules are not effective-dated; however, they are associated with an effective-dated rule program.
To define a condition on the Conditions page, specify the exact relationship that must occur between the elements before an action occurs. The action occurs only if the defined relationship is true. For example, you can specify that an action occurs only if a field equals a certain value or you can specify that an action occurs only if a field value is greater than another defined value. You specify the kinds of elements to compare (for example, a field value to a constant) in the Left Side and Right Side group boxes in the Expression Type fields. You define the precise relationship to occur between these elements (before an action can occur) in the Operator field.
The Conditions page contains several fields that appear permanently, and others that display or hide depending on the left and right condition expression type. The following fields always appear:
Field or Control |
Description |
---|---|
Save As ... |
Select to duplicate a condition by giving it a different name, or create a condition that is similar to an existing condition or a PeopleSoft-delivered condition. This function replaces the Copy Conditions page from previous releases of PeopleSoft Time and Labor. Important! When you use the Save As... button to create the copy, the system saves the source object with any modifications prior to selecting the Save As ... button. You should always create the copy first, and then make changes to the object. Note: You cannot alter individual actions or conditions after they are part of a rule and the system is in production (that is, after Production Environment is selected on the Installation Options page). |
Core Component |
This field is display-only and system-maintained. Time and Labor delivers many SQL objects that are used in templates. If the object you are viewing was created by PeopleSoft, this check box is selected; if you created this object, this check box is cleared. You cannot modify or save this object, but you can copy it and modify the copy. |
Expression Type |
Specify the types of elements to compare in the Left Side and Right Side group boxes to define the condition. Establish the correct relationship between these elements using the Operators field. Valid values are: Constant, Expression, Meta-SQL, Record Field, Rule Tmplate and State Variable. |
Operator |
This field always appears, regardless of the left side or right side expression type. Use the operator to define the relationship between the elements on the left and the right halves of the page. Select one of these values: < (less than) <= (less than or equal to) <> (Less than or greater than = (equal to) > (greater than) >= (greater than or equal to) EXISTS IN NOT EXISTS NOT IN |
Explanation |
Use this expression text box to explain the condition you are defining. |
Depending on the values in the Expression Type fields, these additional fields appear:
Expression Type |
Additional Fields |
---|---|
Constant |
The Left Constant or Right Constant field appears. Enter a constant to define the condition. |
Expression Text |
The Left Condition Expr Type (left condition expression type) or Right Condition Expr Type (right condition expression type) field appears. Enter an expression to define your condition. The expression text can be any length. |
Meta-SQL |
The Left Meta-SQL or Right Meta-SQL field appears. Enter the appropriate meta-SQL to define the condition. |
Record Field |
If the left or right condition expression type is RecField, these fields appear:
|
State Variable |
The Left State Variable or Right State Variable field appears. Enter the state variable to use to define the condition. |