Field Groups (Drop-Down Controls)

A field group in table or table extension objects defines the fields to display in a drop-down control on pages that use the table.

Note

A field group can also be used to specify fields that display when list type pages are shown in the tile view. For more information, see Displaying Data as Tiles.

In a table object, you define field groups by first adding a fieldgroups control, and then adding one or more fieldgroup(<Name>; <Field> keyword for each group, where:

  • <Name> can be either DropDown, for adding fields to the drop-down control.
  • <Field> is a comma-separated list of the fields, by name, to include in the group.
fieldgroups
{
  fieldgroup(Dropdown; Field1, Field2)
  {
        
  }
  fieldgroup(Brick; Field1, Field2)
  {
        
  }
}

Note

The fieldgroups keyword cannot be inserted before the key control.

In a table extension object, the fieldgroups control allows you to add more fields to a field group defined for the table object. This can be done by using the addlast(<name>; <field>) keyword.

Warning

The server will remove the duplicates, if multiple extensions attempt to add the same field more than once. A field can only be added to the field group once.

Define fields for a drop-down control

You define a field to include in a drop-down control by using the DropDown field group name in the keyword.

The following example illustrates how to add the field

tableextension 50100 CustomerExercise extends Customer
{
    fields
    {
        field(50100; "V02Max"; Decimal) { }
    }
   
    fieldgroups
    {
        addlast(DropDown; V02Max) { }
    }
}

See Also

Debugging in AL
Developing Extensions
Microsoft .NET Interoperability from AL