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.
Remarks
Example
This example requires that you create the following
variables.
Variable name |
DataType |
Subtype |
Customer1
|
Record
|
Customer
|
Customer2
|
Record
|
Customer
|
Count
|
Integer
|
|
|
Copy Code |
// 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).
See Also