Editar

Compartir vía


FilterPageBuilder.Name(Integer) Method

Version: Available or changed with runtime version 1.0.

Gets the name of a table filter control that is included on a filter page based on an index number that is assigned to the filter control.

Syntax

Name :=   FilterPageBuilder.Name(Index: Integer)

Parameters

FilterPageBuilder
 Type: FilterPageBuilder
An instance of the FilterPageBuilder data type.

Index
 Type: Integer
The index of a filter control. The value must be in the range 1 to N, where N is the number of filter controls on the filter page.

Return Value

Name
 Type: Text
The name of the filter control.

Example

The following example initializes a filter page object that includes two filter controls for the Date system table. The NAME method returns the names of filter control in a message dialog box.

    var
        varDateItem: Text[30];
        varCount: Integer;
        varIndex: Integer;
        varFilterPageBuilder: FilterPageBuilder;

    begin
        varDateItem := 'Date record';
        varFilterPageBuilder.AddTable(varDateItem + ' 1', Database::Date);
        varFilterPageBuilder.AddTable(varDateItem + ' 2', Database::Date);
        varCount := varFilterPageBuilder.COUNT;
        if varCount <> 2 then
            Error('There should be two controls in FilterPageBuilder');
        for varIndex := 1 to varCount do
            Message('Control item %1 is named %2', varIndex, varFilterPageBuilder.Name(varIndex));
        varFilterPageBuilder.RunModal();
    end;
    

FilterPageBuilder Data Type
Creating Filter Pages for Tables
Get Started with AL
Developing Extensions