I am Trying to use copyfilter but not working here is the code
IncentiveLine.SETFILTER(IncentiveLine."Filter No.",'=%1',Slab);
IncentiveLine.COPYFILTER(IncentiveLine."Product Group
Name",Item_Rec."Product Group")
MESSAGE('%1',Item_Rec.COUNT);
In item table the product group is same as filtered for Incentiveline
It gives total no. of item i. e. 6893 which is not right it should tell 16
according to filter can anybody tell what is wrong.
With thanks
Anand Kumar
Navision Technical Consultant
0
Comments
i.e.
IncentiveLine.COPYFILTER(IncentiveLine."Product Group Name",Item_Rec."Product Group")
before copying we have to set filter on the same filed which we want to copy from
but it is not serving well for me I cant set filter on the same field
any body hv some idea how to cater this?
Anand Kumar
Navision Technical Consultant
This C/AL code shows how to use the COPYFILTER function:
The system copies and applies the filter set for Customer."No." to Vendor."No.". This affects the result of the Record.COUNT function, which counts how many vendors have a number less than 1000.
I know this but probably you didnt got the problem
Anand Kumar
Navision Technical Consultant
How about flowfield?
Dear
I need it just for comparison purpose
and infact i am using it in report so that i can hide unwanted data
through currreport.showoutput(false).................................
Let me b more refined
Here I want to print those sales invoice lines record whose item falls in
that particular Product group.
Anand Kumar
Navision Technical Consultant
have in mind however that in principle Invoice lines may have several lines for the same item with different values of the "Product Group Code"
if you want to filter by Item_Rec."Product Group Code" and not by IncentiveLine."Product Group Code" then you will have to iterate through records:
Dear
My problem is
I have a table whose (Lines) fields are
Slab
product group name
63
AA
63
AB
63
AC
63
AD
63
AE
Now in a report the user selects the Slab 63 now we must show him only that records of sales invoice line in which the item product group code is that which falls in slab 63
becase I only have slab information from header I cant setfilter on product group name instead i can only setfilter on slab
i.e.
IncentiveLine.SETFILTER(IncentiveLine.Slab,'%1',Slab);
IncentiveLine.COPYFILTER(IncentiveLine."Product Group
Name",Item_Rec."Product Group");
Since I am not setting filter on product group name the copyfilter is not working
Anand Kumar
Navision Technical Consultant
I want to copyfilter from a record to another without setting filter
on that particular field which i am copying
Customer.SETFILTER("No.", '<1000');
Customer.COPYFILTER("No.", Vendor."No.");
.
.
Count := Vendor.COUNT;
i.e.
Idont want to setfilter before copyfilter.
It means I want to do this
Customer.COPYFILTER("No.", Vendor."No.");
.
.
Count := Vendor.COUNT;
Anybody have some idea?
Anand Kumar
Navision Technical Consultant