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...
Suggested answer

CalcFormula for Flowfield

(0) ShareShare
ReportReport
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
    132 on at
    RE: CalcFormula for Flowfield

    But we have Job no. on the line level.

  • Suggested answer
    Nitin Verma Profile Picture
    20,991 Moderator 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
    794 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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

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

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans