FieldRef.GetEnumValueName(Integer) Method
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.
Syntax
The Enum value name := FieldRef.GetEnumValueName(Index: Integer)
Parameters
FieldRef
Type: FieldRef
An instance of the FieldRef data type.
Index
Type: Integer
The index in the list of Enum values to get the Enum value (or Option member) name for. The index is 1-based.
Return Value
The Enum value name
Type: Text
The Enum value name.
Example
procedure GetOptionNo(Value: Text; FieldRef: FieldRef): Integer
var
FieldRefValueVar: Variant;
FieldRefValueInt: Integer;
begin
if (Value = '') and (FieldRef.GetEnumValueName(1) = ' ') then
exit(0);
FieldRefValueVar := FieldRef.Value();
FieldRefValueInt := -1;
if Evaluate(FieldRef, Value) then begin
FieldRefValueInt := FieldRef.Value();
FieldRef.Value(FieldRefValueVar);
end;
exit(FieldRefValueInt);
end;
See Also
FieldRef Data Type
Get Started with AL
Developing Extensions
Comentários
https://aka.ms/ContentUserFeedback.
Em breve: Ao longo de 2024, eliminaremos os problemas do GitHub como o mecanismo de comentários para conteúdo e o substituiremos por um novo sistema de comentários. Para obter mais informações, consulteEnviar e exibir comentários de