Jaa


HASFILTER Function (Record)

Determines whether a filter is attached to a record within the current filter group.

Syntax

  
Ok := Record.HASFILTER  

Parameters

Record
Type: Record

The record within the current filter group to check for a filter.

Property Value/Return Value

Type: Boolean

true if there is a filter; otherwise, false.

Example

The following example uses the HASFILTER function to determine whether the Customer table that contains the MyRecord record has a filter. The function returns No because the MyRecord record has no filters. The return value is displayed in a message box. The SETFILTER Function (Record) is then used to set a filter for the table. This time, the return value is Yes because the table now has a filter. This example requires that you create the following variables in the C/AL Globals window.

Variable name DataType Subtype
MyRecord Record Customer
HasFilter Boolean Not applicable
HasFilter := MyRecord.HASFILTER;  
MESSAGE('Does this record have a filter? %1', HasFilter);  
MyRecord.SETFILTER("No.", '100..200');  
HasFilter := MyRecord.HASFILTER;  
MESSAGE('Does this record have a filter? %1', HasFilter);  

See Also

Record Data Type