The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.

GETFILTERS Method (RecordRef)

Determines which filters have been applied to the table referred to by the RecordRef.


String := RecordRef.GETFILTERS  


Type: RecordRef

The RecordRef to use to identify the record in the table on which filters may have been applied.


This method works just like the GETFILTERS Method (Record).

Property Value/Return Value

Filters that have been applied to the table that is referred to by the RecordRef parameter.


The following example opens a table as a RecorRef variable. The variable, RecRef, is used with the GETFILTERS method to retrieve the filters that are applied in the Customer table. If filters are applied, they will be stored in the Filters1 variable. The Filters1 variable does not contain any filters because filters have not been set. Then the SETRECFILTER Method (RecordRef) is used to set the value in the current key of the current record as a filter. The variable Filters2 will now contain No. as a filter. The example requires that you create the following global variables and text constant.

Variable name DataType
RecRef RecordRef
Filters1 Text
Filters2 Text
Text constant name DataType ENU value
Text000 Text Filters1 contains : %1 Filters2 contains: %2

Filters1 := RecRef.GETFILTERS;  
Filters2 := RecRef.GETFILTERS;  
MESSAGE(Text000, Filters1, Filters2);  

See Also

RecordRef Data Type