Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Flow Field calculation

(0) ShareShare
ReportReport
Posted on by 161

Hi

I am looking to extend the purchase line with a flow field which will multiply the "qty to invoice" by the "Unit cost".

This is what I have so far. 

   field(50202; "lAmountToInvoice"; Decimal)

        {
            FieldClass = FlowField;
            CalcFormula = sum("Purchase Line"."Unit Cost (LCY)" where("Document No." = field("Document No."), "Qty. to Invoice" = filter(> 0)));
        }
This will just sum the unit cost but I want to multiply it by the qty to invoice.
Am I doing this the correct way is is there a better solution?
Thanks Neil.
  • Neil Phelan Profile Picture
    161 on at
    RE: Flow Field calculation

    Thanks Inge, it's pity they hadn't been shown that previosuly and I didn't know it.

    Brilliant thanks.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,025 Moderator on at
    RE: Flow Field calculation

    But that information is already avalible if they click F7 on the purchase order / purchase invoice ?

    pastedimage1643892867205v1.png

  • Neil Phelan Profile Picture
    161 on at
    RE: Flow Field calculation

    Inge

    Thanks for your response. The primary reason for this request is that I want  to add a running total to the purchase order screen when the qtytoinvoice is ticked.

    I have it that it sums the unit cost but I want it to multiple by the qty that I want to invoice. The porpose is for the acocunts team to reconcile the invoice they are posting matches correctly.  

    pastedimage1643892396104v1.png

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,025 Moderator on at
    RE: Flow Field calculation

    Do you want to see the information only on line level or only a sum om head level?

    Because you are using the Qty. to invoice it will be short lived data. So i am not convinced that a flow field is the best approach.

    Maybe a function that calculate this on the fly when requested is better.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,469 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,066 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans