Defining Message Elements

Message elements are closely related to formula elements. To fully understand message elements, read the topic on formulas before reading this topic.

This topic discusses how to define message elements.

Note: No online pages specifically define message elements, because they are provided in system data.

By referencing the message element in a formula, you can manage the error messages that are created during batch processing. A message element calls a program that writes an error message into the error message table (PS_GP_MESSAGES) and then, optionally, puts the payment in error.

Many of the fields in the PS_GP_MESSAGES table are system-populated. Others are populated during batch processing. By using these field values as components of a formula, you can create your own message and error conditions during batch processing.

To populate fields that aren't system-populated, these components and processes are provided:

  • Five system elements (MSG_BIND1_PTR … MSG_BIND5_PTR), with the Pointer field format.

    These pointers point to the parameters that you're using in your error messages.

  • Five numeric system elements (MSG_BIND1_NM_IND … MSG_BIND5_NM_IND).

    If the value of MSG_BINDx_NM_IND equals zero, the system displays on the Payee Messages page the element name to which the MSG_BINDx_PTR element points. Otherwise it displays the value of the element that is pointed to by MSG_BINDx_PTR.

  • Numeric system elements for the message number (MSG_NBR) and MSG_SET_NBR.

  • A numeric system element (MSG_PAYMENT_ERR) that can put the calculation in error.

    If the value of this system element doesn't equal 0, the calculation is in error.

  • An error message element type.

    This element type has only one element in the GP_PIN_NM table (MESSAGE). The field format is Decimal. The Recalc (recalculation) check box must be deselected. This entry type is available only on the Field-by-Field Definition page and for Element 1 and Element 2. When the batch process encounters this message (formula) element, it inserts a row in the PS_GP_MESSAGES table for the message ID and parameters specified. If there's no error, the MESSAGE element equals zero. If there's an error, the MESSAGE element equals one. The primary purpose of this element type is to enable the batch process to recognize that a user error needs invoking. The batch process doesn't look at its value.

Every system element that is related to an error message is reset to blank or zero.

Note: You can create your own error messages only by using formula elements.

Example

This table gives an example of a formula element setup (a portion of an entire formula expression):

Sequence Number

Function

Element 1

Operator

Element 2

Assign To Element

1

If

XXXXX

=

YYYYY

 

2

Then (error)

 

 

17005

MSG_SET_NBR

 

 

 

 

1015

MSG_NBR

3

 

 

 

ELEMENT_A (Use Element Number)

MSG_BIND1_PTR (Use Element Number)

4

 

 

 

ELEMENT_B (Use Element Number)

MSG_BIND2_PTR (Use Element Number)

5

 

 

 

1

MSG_BIND1_NM_IND

6

 

 

 

1

MSG_PAYMENT_ERR

7

If

MESS_AGE

=

0

 

8

. . .

 

 

 

 

This table provides explanations of the formula described in the previous table:

Sequence Number

Explanation

1

This is a regular expression in the formula.

2, 3

Assign the error message number to the system element MSG_NBR and MSG_SET_NBR.

3

Assign the element number ELEMENT_A (represents the element in error) to MSG_BIND1_PTR pointer value.

4

Assign the element number ELEMENT_B (represents the element in error) to MSG_BIND2_PTR pointer value.

5

Assign the value 1 to MSG_BIND1_NM_IND to indicate that ELEMENT_A contains an element number. Because no value has been assigned to MSG_BIND2_NM_IND, it appears as an element value.

6

Assign the value 1 to element MSG_PAYment_ERR, which puts the payment status in error.

7

Use the message element, which calls the resolution program for this element type.

Note: An indicator tells the system whether a number value is an element number so that the formula message program knows whether to leave that value alone or retrieve that element's value. Leaving that value alone means that the element name is displayed on the online message page.