FilterPageBuilder.AddTable(Text, Integer) Method

Version: Available or changed with runtime version 1.0.

Adds filter control for a table to a filter page.

Syntax

[Name := ]  FilterPageBuilder.AddTable(Name: Text, TableNo: Integer)

Parameters

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

Name
 Type: Text
Assigns a name to the filter control for the table. The text displays as the caption for the filter control on the rendered filter page in the client.

TableNo
 Type: Integer
The ID of the table object that you want to filter on.

Return Value

[Optional] Name
 Type: Text
The text that is specified by the Name parameter. If an error occurs at runtime, an empty text string is returned. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.

Remarks

In the filter page that is rendered in the client, the AddTable method defines a filter control for the specified table where the user can set filters on specific fields in the table.

You can use the AddField Method or AddFieldNo Method method to add field of the table to the filter control.

Example

The following example initializes a filter page object that includes a filter control that uses the Date system table. The filter control has the caption of Date record.

var
    varDateItem: Text[30];
    varFilterPageBuilder: FilterPageBuilder;

begin
    varDateItem := 'Date record';  
    varFilterPageBuilder.AddTable(varDateItem, Database::Date);
    varFilterPageBuilder.RunModal(); 
end;

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