title | description | ms.author | ms.date | ms.tgt_pltfrm | ms.topic | author |
---|---|---|---|---|---|---|
FieldRef.GetEnumValueNameFromOrdinalValue(Integer) Method |
Gets an Enum value (or Option member) name from the Enum metadata for the field that is currently selected. |
solsen |
02/26/2024 |
na |
reference |
SusanneWindfeldPedersen |
Version: Available or changed with runtime version 4.0.
Gets an Enum value (or Option member) name from the Enum metadata for the field that is currently selected.
The Enum value name or empty if the ordinal value doesn't exist := FieldRef.GetEnumValueNameFromOrdinalValue(Ordinal: Integer)
FieldRef
Type: FieldRef
An instance of the FieldRef data type.
Ordinal
Type: Integer
The Enum value's ordinal value to get the Enum value (or Option member) name for.
The Enum value name or empty if the ordinal value doesn't exist
Type: Text
The Enum value name.
procedure OptionNoExists(var FieldRef: FieldRef; OptionValue: Text): Boolean
var
OptionNo: Integer;
begin
if Evaluate(OptionNo, OptionValue) then
exit((FieldRef.GetEnumValueNameFromOrdinalValue(OptionNo) <> '') or ((FieldRef.GetEnumValueNameFromOrdinalValue(OptionNo) = '') and (OptionNo = 0)));
exit(false);
end;
FieldRef Data Type
Get Started with AL
Developing Extensions