web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

CalcFormula

(1) ShareShare
ReportReport
Posted on by 79
Hello , 
 
I have  create flowfield in table customer to calculate  the number of elements in the Cust table. Ledger 
 
    field(50001; "Nb doc over 30d"; Integer)
        {
           FieldClass = FlowField;                  
           CalcFormula = count ("Cust. Ledger Entry" where ("Posting Date" <= (Today()-30D) ) );
           }
 
My Issue is CalcFormula doesn't work ?
 
 
the issur is : 
 
 
Thanks for any help 
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    27,024 Most Valuable Professional on at
    Hi
    Do you get an error? Or do you get a wrong quantity?
    BR
    GR
  • Suggested answer
    Dynamics_Decoded_Gokul Profile Picture
    487 on at
    Hi 

    Please flowfilter concept to avoid this error 

    1. Create a flowfilter for date add that to your calcformula. 
    2. Where ever you require page. OnOpen and onAftergetrecord trigger add the code for passing the values to the flowfilter. 
    3. which will result you the Required output 
     
    field(50001; "Nb doc over 30d"; Integer)
            {
                FieldClass = FlowField;
                CalcFormula = count("Cust. Ledger Entry" where("Posting Date" = Field("Date Filter")));
            }
            field(50002; "Date Filter"; Date)
            {
                FieldClass = FlowFilter;
            }
  • Verified answer
    Mounir M Profile Picture
    79 on at
    Thanks for your answer
     
    I have declared 3 FlowField fileds like this  in table Customer:
     
     
    after I have add trigger OnAfterGetRecord on page Customer List : 
     
     
    the calculation is perfect 
     
    my issue is : in  the details when i click on "Nb doc over 30d" or "Nb doc over 60d" or "Nb doc over 90d"  it show the same filter 
     
     
     
    it take the last data filter passed  (Rec.SetFilter("Date Filter", '<=%1', DMY2DATE(01, 02, 2022));)
     
    the Document date must be show the date passed in argumnet 
     
    Any idea 
     
    Thanks 
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,260 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,515 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,373

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans