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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Adding values from fields

(0) ShareShare
ReportReport
Posted on by

Hi,

I want to add the values together from the 'Amount' fields in each of my purchase lines.

How do I do this?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    where do you want to do it?

    if it is in codeunits etc then I would declare a Purchase Line record variable and loop through all the records as per the requirement and calculate in a global decimal variable.

  • Community Member Profile Picture
    on at

    Hi Mohana,

    Thanks for replying.

    Thats pretty much what I have:

    IF PurchaseLine.FINDSET THEN

       REPEAT

         ReceivedNotInvoiced := PurchaseLine."Amount";

       UNTIL PurchaseLine.NEXT = 0;

     MESSAGE('My Received Not Invoiced Amount is %1.',ReceivedNotInvoiced);

    Will this work?

  • Verified answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    make it

    ReceivedNotInvoiced := ReceivedNotInvoiced + PurchaseLine."Amount";

    and

    IF ReceivedNotInvoiced  <> 0 then

     MESSAGE('My Received Not Invoiced Amount is %1.',ReceivedNotInvoiced);

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans