# FieldRef.Active() Method
> Version: _Available or changed with runtime version 1.0._
Checks whether the field that is currently selected is enabled.
## Syntax
```al
Ok :=   FieldRef.Active()
```
> NOTE
> This method can be invoked using property access syntax.
## Parameters
FieldRef
Type: fieldref-data-type
An instance of the fieldref-data-type data type.
## Return Value
Ok
Type: ../boolean/boolean-data-type
## Remarks
Each field in a record can be set as enabled or disabled in the table description. You cannot use a disabled field because disabled fields cannot contain data.
This method is like the ../record/record-fieldactive-method.
## Example
The following example opens table 18 \(Customer\) as a RecordRef variable that is named Recref. The ../recordref/recordref-field-method uses Recref to create a FieldRef variable that is named MyFieldRef. MyFieldRef sets a reference to the first field \(field 1\) in the table. The fieldref-setrange-method sets a filter that selects record 30000. The ../recordref/recordref-field-method selects the record and then loops through fields 1 through 6. For each field, the Active method determines whether the field is enabled. If the field is enabled, a message that states that the field is enabled is displayed. Otherwise, a message that states that the field is not enabled is displayed.
> NOTE
> You can use the name of the table instead of the table number to open the table by using the following syntax:
```al
RecRef.Open(DATABASE::Customer)
```
```al
var
    Recref: RecordRef;
    MyFieldRef: FieldRef;
    i: Integer;
    Text000: Label 'Field %1 is enabled.';
    Text001: Label 'Field %1 is not enabled.';
begin
    Recref.Open(18);
    MyFieldRef := Recref.Field(1);
    MyFieldRef.SetRange('30000');
    Recref.Find('-');
    for i := 1 to 5 do begin
      MyFieldRef := Recref.FieldIndex(i);
      if MyFieldRef.Active then
        Message(Text000, i)
      else begin
        Message(Text001, i)
      end;
    end;
end;

```
## Related information
fieldref-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/fieldref/fieldref-active-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/fieldref/fieldref-active-method/
