SetEditTable method: Message class
Syntax
SetEditTable(%PromptField, RECORD.recordname)
Description
The SetEditTable method works with the ExecuteEdits method. It is used to set the value of a field on a record that has its prompt table defined as %PromptField value. %PromptField values are used to dynamically change the prompt record for a field.
There are several steps to setting up a field so that you can dynamically change its prompt table.
To set up a field with a dynamic prompt table:
-
Define a field in the DERIVED record called fieldname.
-
In the record definition for the field that you want to have a dynamic prompt table, define the prompt table for the field as %PromptField, where PromptField is the name of the field that you created in the DERIVED record.
-
Use SetEditTable to dynamically set the prompt table.
%PromptField is the name of the field on the DERIVED work record. RECORD.recordname is the name of the record to be used as the prompt table.
&MSG.SetEditTable("%EDITTABLE1", Record.DEPARTMENT);
&MSG.SetEditTable("%EDITTABLE2", Record.JOB_ID);
&MSG.SetEditTable("%EDITTABLE3", Record.EMPL_DATA);
&MSG.ExecuteEdits();
Every field on a record that has the prompt table field %EDITTABLE1 will have the same prompt table, such as, DEPARTMENT.
Parameters
| Parameter | Description |
|---|---|
|
%PromptField |
Specifies the name of the field in the DERIVED record that has been defined as the prompt table for a field in a record definition. |
|
RECORD.recordname |
Specifies the name of the record definition that contains the correct standard system edits to be performed for that field in the message. |
Returns
None.