AOTTableFieldList.addEnum Method
Adds a new field of the enum type to the list of fields for the current table.
Syntax
public void addEnum(str name)
Run On
Called
Parameters
- name
Type: str
The name of the field to add.
Remarks
If the supplied name coincides with an existing field in the field list, an integer is appended to the name of the new field to make the field name unique.
It is up to the developer to make sure that the name is not a reserved word; the method will not throw an error if a reserved word is specified. You can use the AOTfindChild method to determine whether a field name is already being used.
Examples
The following example adds the NewEnum field, which is of the enum type, to the list of fields of the TutorialJournalName table.
AOTTableFieldList tfl = infolog.findNode(
'\\Data Dictionary\\Tables\\TutorialJournalName\\Fields');
if (!tfl.AOTFindChild('NewEnum'))
{
tfl.addEnum('NewEnum'); // adds the field NewEnum
}