Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

CalcFormula for Flowfield

Posted on by 132

Hi Developers,

I've a scenario to calculate "Total of amounts in purchase line where Purchase header is sent for approval" and show the data on Job Header.

I want to use a flowfield with CalcFormula of sum


Is it possible to do so? if Yes then how?

  • Hasnain Ali Profile Picture
    Hasnain Ali 132 on at
    RE: CalcFormula for Flowfield

    But we have Job no. on the line level.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: CalcFormula for Flowfield

    In that case you have already two fields available on purchase header I.e. amount and amount inc. vat those are flow fields and have the sum of line amount total. You can try to use of them.

  • Suggested answer
    Tech-Lucky Profile Picture
    Tech-Lucky 796 on at
    RE: CalcFormula for Flowfield

    Hi Hasnain,

    if I understood your question correctly, you want to calculate the Total Amount from Purchase Line where the Purchase Header is also involved to check the status is sent for approval, so as you might know that Flow FIelds can not be used in that way we can only use the table filters that we are using to calculate the value from, so in your case you need to customize some more you have following ways to achieve this : 

    1.) You Have to Create a field on Purchase Line to Mark that field if the Header is sent for approval and then you can use that field in your calc formula to filter purchase lines whose header is sent for approval.

    2.) You can create a Field on Purchase Header as Total Line Amount but this should not be a flow field you need to make this field updated from your code only either on Open Page or onValidate of Purchase Line Unit Price and so on. then you can create the flow field using the Purchase Header table in Job Header you will have the filter of Purchase Header Status and you can use the field to as the total amount.

    I will suggest you use the first option.

    Please mark this answer as verified if this was helpful.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans