Export (0) Print
Expand All

COPYFILTER Function (Record)

Microsoft Dynamics Nav 2009

Copies the filter that has been set for one field and applies it to another field.


Record.COPYFILTER(FromField, ToRecord.ToField)

Parameters

Record

Type: Record

The record from which to copy the filter.

FromField

Type: Field

The field from which the filter will be copied.

ToRecord.ToField

Type: Record.Field

The record and field to which you want to apply the copied filter.

The FromFields and ToFields must be of the same data type, but they do not have to belong to the same table.

This example requires that you create a Record variable for the Customer table named Customer and an Integer variable named Count.

Customer.SETFILTER("No.", '<1000'); 
Customer.COPYFILTER("No.", Vendor."No."); 
.
.
Count := Vendor.COUNT;

The filter set for Customer."No." is copied and applied to Vendor."No.". This affects the result of the COUNT Function (Record), which counts how many vendors have a number less than 1000.

Community Additions

ADD
Show:
© 2014 Microsoft