SetTranslateValue method: FieldDefn class

Syntax

SetTranslateValue(Translate_value,Active,EffDate,Long_name,Short_name)

Description

Use this method to add a new translate value or modify an existing value.

Parameters

Parameter Description

Translate_value

Specifies the translate value as string.

Active

Specify a Boolean value whether the translate value is active or not.

EffDate

Specifies the effective date.

Long_name

Specifies the long name of the translate value as string

Short_name

Specifies the short name of the translate value as string

Returns

An integer representing the following statuses.

Numeric Value Constant Value Description

0

%MDA_Success

The translate values are updated.

1

%MDA_Failed

The translate values are not updated.

Example

Local FieldDefn &newField = CreateFieldDefn();
If All(&newField) Then
   &newField.Name = "MYNEWFIELD";
   &newField.Type = %FieldType_Char;
   &newField.Description = "My new field";
   &retVal = &newField.SetLabel("MYNEWFIELD", "My field", "My New Field", True);
   /* do error checking … */
   Local date &myDate = Date3(1900, 1, 1);
   &retVal = &newField.SetTranslateValue("A", True, &myDate, "My New XLAT", "My XLAT");
   /* do error checking … */
   &retVal = &newField.Save();
   /* do error checking … */
End-If;