Version: Available or changed with runtime version 1.0.
Builds and runs the filter page that includes the filter controls that are stored in FilterPageBuilder object instance.
[Ok := ] FilterPageBuilder.RunModal()
true if the operation was successful; otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.
The page is run modally and includes an OK and Cancel button for closing to modal popup.
You can call the GetView Method method to retrieve the current filter view that is configured on the filter control and apply to the record.
Because the filter page runs modally in the context of where it was invoked from, users cannot bookmark a link to this page from the user interface.
The following example initializes a filter page object that includes a filter control for the Date system table. The filter control has the caption of Date record. The example adds two filter fields to the filter control on the filter page as the result of applying a default view. The GetView Method is used to capture that filter view from the FilterPageBuilder object, and then apply it to the record.
var varDateItem: Text; varDateRecord: Record Date; varFilterPageBuilder: FilterPageBuilder; varDefaultView: Text; begin varDateItem := 'Date record'; varDateRecord.SetFilter("Period End", '20151212D'); varDateRecord.SetFilter("Period Start", '20150101D'); varDefaultView := varDateRecord.GetView; varFilterPageBuilder.AddTable(varDateItem, Database::Date); varFilterPageBuilder.SetView(varDateItem, varDefaultView); if varFilterPageBuilder.RunModal = true then varDateRecord.SetView(varFilterPageBuilder.GetView(varDateItem)); end;