FilterPageBuilder.AddTable(Text, Integer) Method

Version: Available or changed with runtime version 1.0.

Adds filter control for a table to a filter page.


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


 Type: FilterPageBuilder
An instance of the FilterPageBuilder data type.

 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.

 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.


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.


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.

    varDateItem: Text[30];
    varFilterPageBuilder: FilterPageBuilder;

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

See Also

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