Filtering current month in FlowField

kwbburmeisterkwbburmeister Member Posts: 15
Hello everyone,

I hope, I'm not double-posting, but I didn't find anything.

Here's my problem: I'm trying to create a FlowField on the "Purchase Line", giving me the "Remaining Quantity" for a specific item in the current month (and for the next month in another FlowField). Is that even possible? I don't know what to put in the Calculation Formula for my FlowField.

Thank you very much for your support.

Greetings,
Sascha

Comments

  • matttraxmatttrax Member Posts: 2,309
    Probably best to use a Date Filter FlowField to calculate that. There are a ton of examples for that specifically throughout the NAV tables, like the balance fields on Customer and Vendor records.
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    I don't know what to put in the Calculation Formula for my FlowField

    It is not possible using FlowField definition not involving any FlowFilter at all, it is also impossible using FlowFiled+FlowFilter fields without coding. You will have to use some code on the form as well.

    Your FlowField must in include something like: Posting Date=FIELD(Date Filter). The code on the form (in OnAfterGetRecord on list form or OnAfterGetCurrentRecord on Card Form) should look like:

    SETRANGE("Date Filter", CALCDATE('<-CM>', WORKDATE), CALCDATE('<CM>', WORKDATE));
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • SogSog Member Posts: 1,023
    Why would you want to use the multiple fields for different months?
    I advice you to rethink your solution. Could you tell us what you want to achieve, maybe we can come up with a more NAVvy solution.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
Sign In or Register to comment.