Skip to main content

[Validation & Line Loop & Macro] How to calculate the total quantity of a document

Comments

5 comments

  • george harris

    I have tried this and it works for integers but not for floats.
    Below message occours when the QTY is not an integer.
    Message: Macro error in UF-036: System.Exception: Input string was not in a correct format.
    [Macro Command: set($[$BOYX_5.0.NUMBER]|2.5)]

    Macro Enviroment parameters:
    [Current Form: 140 - Delivery]
    [Source Row: 2] [Target Row: 2] [Break: False] [Initial

    0
  • Naama Aharoni

    Hi George,

    Please try to replace the NUMBER with CURRENCY.

    Thanks, Naama

    0
  • george harris

    Instead of
    set($[$BOYX_5.0.Number]|$[LLRESULT.Number]);

    I used
    set($[$BOYX_5.0.CURRENCY]|$[LLRESULT.Number]);

    and it works!!
    Thank you!

    0
  • Adam Hunniford

    Rather than start a new thread, since my problem is the same, I thought it wise to ask here.

    Fundamentally I have the same issue but the 'currency' fix did not work. It removed the error but the value is not written to the UDF. I am testing where the value is 599.8. I tried changing to currency in the line loop final result but this doesnt change anything. Do I need to change the UDF type? There are a bunch of other options but I am unsure which is best.

     

    Can anyone advise?

     

    Thanks

    0
  • Sarah Swettlen

    Hello,

    How would you filter this out to only total the quantity for specific items?

    Thank you

    0

Please sign in to leave a comment.