FlowField, sum, workaround

StGroStGro Member Posts: 13
Hello,

I really need some help with this..
After upgrading to 3.7, amount (LCY) is a FlowField.
Because of this, the following CalcFormula in a table is not possible anymore:
Sum("Cust. Ledger Entry"."Amount (LCY)" WHERE (Document Type=FILTER(Invoice|Credit Memo), custom_field=FIELD(No.)))

So I took the original CalcFormula of "Amount (LCY)" of "Cust. Ledger Entry" and removed the filter "Cust. Ledger Entry No. = Entry No.".

The original CalcFormula sums up some values from "detailed cust. ledger entry".

Now I need to add both filters mentioned in the code above: "type = invoice|credit memo" and "custom_field=FIELD(No.)"
I can add the first one without a problem, as it is part of the table "detailed cust. ledger entry".
But the "custom_field" is part of "customer ledger entry" so I cannot work with it this way, but of course it was possible with the code above, in navision 2.01 where amount(LCY) could be used in a sum FlowField.

I hope this description is not too weird to understand and someone out there can help..

Thanks for your help in advance,
Steffen

Comments

  • bostjanlbostjanl Member Posts: 107
    StGro wrote:
    Hello,

    I really need some help with this..
    After upgrading to 3.7, amount (LCY) is a FlowField.
    Because of this, the following CalcFormula in a table is not possible anymore:
    Sum("Cust. Ledger Entry"."Amount (LCY)" WHERE (Document Type=FILTER(Invoice|Credit Memo), custom_field=FIELD(No.)))
    

    So I took the original CalcFormula of "Amount (LCY)" of "Cust. Ledger Entry" and removed the filter "Cust. Ledger Entry No. = Entry No.".

    The original CalcFormula sums up some values from "detailed cust. ledger entry".

    Now I need to add both filters mentioned in the code above: "type = invoice|credit memo" and "custom_field=FIELD(No.)"
    I can add the first one without a problem, as it is part of the table "detailed cust. ledger entry".
    But the "custom_field" is part of "customer ledger entry" so I cannot work with it this way, but of course it was possible with the code above, in navision 2.01 where amount(LCY) could be used in a sum FlowField.

    I hope this description is not too weird to understand and someone out there can help..

    Thanks for your help in advance,
    Steffen

    I had a simillar problem. I created a function in Cust.Ledg.Entry wich returns the value I want.

    BostjanL
Sign In or Register to comment.