Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Calculate Amount ??

(0) ShareShare
ReportReport
Posted on by 768

Hi Experts,

i have custom document page i want to calculate Amount.

Amount field are in the line table and Total Amount field are also in the line table.

i want to calculate only those Amount which "Document No." = "No."

Total Amount := sum(amount) where "Document No" = "No".

"No." is a header Primary key and the "Document No." field are the header field in the line table.

Note: all the fields are in the line table 

*This post is locked for comments

  • Verified answer
    RE: Calculate Amount ??

    yes you are right sir but the total field are also in line and the problem solved 

    here is the solution 

    FieldClass = FlowField;
    CalcFormula = sum ("DLX Event Registration Lines".Amount where ("Document No." = field ("Document No.")));
  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Calculate Amount ??

    As written above, create a flowfield on the Header table that sums the amount field you want (I don't know what is the amount field you want to sum) for all the lines related to the header table.

  • RE: Calculate Amount ??

    yes you are right but here the total field are in the line table and the amount are also in the line table 

    1 Total Amount ( Tab Line).

    2 Amount ( Tab Line).

    i want to calculate the amount on condition 

    To calculate the amount for all those line which which are link with header.

    3 Header and Line Relationship

    Header "No." and Line "Document No"  

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Calculate Amount ??

    I've not understood the question, sorry. You can create a flowfield on the header table with the CalcFormula = what you have written (sum(YourLineTable.amount) where YourLineTable."Document No" = "No".)

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans