Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

COPYFILTERS Function (Record)

Copies all the filters set by the SETFILTER Function (Record) or the SETRANGE Function (Record) from one record to another.


Record.COPYFILTERS(FromRecord)

Parameters

Record

Type: Record

The record to which you want to copy filters.

FromRecord

Type: Record

The record from which you want to copy filters.

This function is used to apply the filters defined for one record to another record. The filters are used as a basis for counting, searching, calculating, or a similar operation.

This example requires that you create the following variables.

Variable name DataType Subtype

Customer1

Record

Customer

Customer2

Record

Customer

Count

Integer

 

// Set filters on fields in a Customer record
Customer1.SETFILTER("No.", '<1000');
Customer1.SETRANGE("Credit Limit (LCY)", 10000, 20000);
Customer1.MARKEDONLY(TRUE); 
// Apply filters to another record
Customer2.COPYFILTERS(Customer1);
Count := Customer2.COUNT;

The filters defined for Customer1 are copied and applied to Customer2. This affects the result returned by the COUNT Function (Record).

Community Additions

ADD
Show:
© 2015 Microsoft