I have a table known as Dash Board. Its having one record and mostly it contains flowfields and flowfilters.
There is a field called ‘Purchase Quantity of the Month’. This should display the sum of purchase quantity received from the start of the current month till today. I have a flowfilter called ‘Date Filter’. I am entering only single date here. (suppose today).
How can i get the value in the above field using calcFormula ?
The Dash Board table you have described sounds very similar to the way the Activities pages work in NAV 2009. If I take Page 9063 as an example, there is a flow field that has a date filter.
The Page has some code in the OnOpenPage() trigger that will set the DateFilter field on the page. The code is:
RESET;
IF NOT GET THEN BEGIN
INIT;
INSERT;
END;
SETFILTER(“Date Filter”,’>=%1’,WORKDATE);
Then the actual field for Upcoming Orders has the following FlowField definition:
Count(“Purchase Header” WHERE (Document Type=FILTER(Order),Status=FILTER(Released),Expected Receipt Date=FIELD(Date Filter)))
You should be able to take this information and apply it to your situation by changing the SETFILTER to set a range for the current month based upon Worddate and setting the flowfield definition to match your requirements.