RecordRef.HasFilter() Method
Version: Available or changed with runtime version 1.0.
Determines whether a filter has been applied to the table that the RecordRef refers to.
Syntax
Ok := RecordRef.HasFilter()
Note
This method can be invoked using property access syntax.
Parameters
RecordRef
Type: RecordRef
An instance of the RecordRef data type.
Return Value
Ok
Type: Boolean
true if the table referred to by RecordRef has a filter; otherwise, false.
Remarks
This method works just like the HasFilter Method (Record).
Example
The following example opens the Customer table with a RecordRef variable that is named RecRef. The HasFilter method determines whether a filter has been applied in the Customer table. The method returns false because no filters are applied. The return value is stored in the varHasFilters variable. The SetRecFilter Method (RecordRef) is used to set a filter. The HasFilter method now returns true. This example requires that you create the following global variables and text constant.
var
varHasFilters: Text;
RecRef: RecordRef;
Text000: Label 'Are there any filters? %1';
begin
RecRef.Open(Database::Customer);
VarHasFilters := RecRef.HasFilter;
Message('Are there any filters? %1', VarHasFilters);
RecRef.SetRecFilter;
VarHasFilters := RecRef.HasFilter;
Message(Text000, VarHasFilters);
end;
See Also
RecordRef Data Type
Get Started with AL
Developing Extensions