SetRecFieldEditTable function

Syntax

SetRecFieldEditTable(Record.RecordName, Field.FieldName, EditTable [, TableEditType])

Description

Use the SetRecFieldEditTable function to set the edit table value for a record field. This overwrites the value for the edit table for the record field. Use the SetEditTable Record method to just set the edit table value at runtime.

If you specify a null value for EditTable, and no value is specified for TableEditType, the table edit flag is turned off, that is, no prompt table is set for the record field.

Parameters

Parameter Description

RecordName

Specify the record containing the field you want to change. This name must be prefixed by the reserved word Record.

FieldName

Specify the name of the field that you want to modify. This name must be prefixed by the reserved word Field.

EditTable

Specify the name of the edit table record. This name must be prefixed by the reserved word Record. If you do not want to specify a record name, specify Record."".

TableEditType

Specify the type of edit table record to be associated with the record field. If you specify a value for EditTable (and not a null value) this parameter is required. You can specify either a constant or numeric value for this parameter. Valid values are:

Constant Value Numeric Value Used for which types of fields

%EditTableType_NoEdit

0

Character, Number, Date, Time, Datetime

%EditTableType_Prompt

1

Character, Number, Date, Time, Datetime

%EditTableType_YesNo

2

Character

%EditTableType_Translate

3

Character fields with length 4 or less only

%EditTableType_OneZero

4

Number fields only

Returns

A constant value. The values are:

Value Description

%MDA_Success

Function completed successfully.

%MDA_Failure

Function didn't complete successfully.

%MDA_RecordNotFound

The specified record wasn't found.

%MDA_RecFieldNotFound

The specified field wasn't found on the record.

Example

&ret = SetRecFieldEditTable(RECORD.AbsHist, Field.OrgId, RECORD.EmplId_Tbl, %Edit⇒
TableType_Prompt);  
If (&ret = %MDA_Success) Then 
   MessageBox(0, "Metadata Fn Status", 0, 0, "SetRecFieldEditTable succeeded"); 
Else 
   MessageBox(0, "Metadata Fn Status", 0, 0, "SetRecFieldEditTable failed"); 
End-If;

Considerations Using this Function

This function is intended for use during configuration time only, before active runtime usage is initiated. Using this function during active runtime is not supported. Changes to data definitions are not recognized on currently loaded component. In general, changes aren't recognized until the component is reloaded.

WARNING:

These operations take place in a separate transaction from the page's save status: the initiation of any of these operations immediately changes the definitions, even if the page is subsequently cancelled.