Hi Following line is the DataitemTableview property of dataitem “Sales” SORTING(“Nr.”) WHERE(Amount=CONST(0)) note that the “Amount” is flow field. My questions is, whether this filter implicitly call the CALCFIELDS function for the field “Amount” ? Regards Joseph Mathew
The answer lies in the Form Control containing the Amount FlowField. It is called AutoCalcField. By default this value is Yes. Meaning the the FlowField will be calculated automatically. Navision is smart enough to Calculate the field prior to applying the filter on each line. If similar logic is used in a codeunit, you must explicitly caculate the value using Calcfields. Bill Benefiel Manager of Information Systems Overhead Door Company billb@ohdindy.com (317) 842-7444 ext 117
Bill! Are you sure? Try it! In any form i can set filter like “FlowField_Amount” <> 0. And it’s works. In codeunit i can open table with filter “FlowField_Amount <> 0”. And it’s works too! Business Applications Programmer Sertified Navision Developer SIA “Sintegra” Latvia
Hi Bill My question is regarding dataitem of reports. There will no ‘AutoCalcField’ for dataitem in reports Regards Joseph Mathew
Alexei Pavlov: You are correct. I stand corrected. I used the character product (Avista) for alot of years and sometimes it must still trip me up! Thanks! Joseph Mathew: Sorry I misunderstood you first question. However, it works much the same as a report. For testing I threw together a very simple report using the Sales Header. I filtered as you did with Amount = 0 and in return, it printed only 0 Amount recrods. Note, the Amount field was not ever explicitly used (CALCFIELDS Command) or on the DataItem property CALCFIELDS. It seems that Navision is very intelligent when it comes to the use of FlowFields. Bill Benefiel Manager of Information Systems Overhead Door Company billb@ohdindy.com (317) 842-7444 ext 117 Edited by - wbenefiel on 2001 Jun 28 16:28:57