Options

Help with a formula in code

DarkHorseDarkHorse Member Posts: 389
Dear sirs, I've the following code on "Qty. to Receive" field from "Purchase Line" table.

MESSAGE:='The Item '+Item."No."+
' is associate to a tax, you must sum '
+FORMAT(amortize, 0, '<Precision,2:2><Standard Format,0>')+' by unit at the quantity of '+FORMAT("Qty. to Receive")+
' In total'+FORMAT(amortize*"Qty. to Receive");

The code runs well. On final code ' In total'+FORMAT(amortize*"Qty. to Receive"); I want to put also 2 decimals as before, putting (amortize, 0, '<Precision,2:2><Standard Format,0>')+, it will be somethig like
+FORMAT(amortize, 0, '<Precision,2:2><Standard Format,0>')*"Qty. to Receive")
But it doesn't let me, it says "The conversion of types is not possible..... Text * Decimal". The amortize variable is a decimal one and also "Qty. to Receive", I tried put "Format" but the result is the same; I suppose it's a matter of mathematical or parenthesis, but I can't find the formula. Any help please?.
Thanks.

Comments

  • Options
    ShedmanShedman Member Posts: 194
    Try
    +FORMAT(amortize*"Qty. to Receive", 0, '<Precision,2:2><Standard Format,0>'))
    

    And next time, don't forget the ladies on the forum :P
  • Options
    DarkHorseDarkHorse Member Posts: 389
    Perfect!!!!! =D>
    What I fool I am ](*,) ... Well, thanks you very much for your help and your time.
  • Options
    BeliasBelias Member Posts: 2,998
    FORMAT(amortize, 0, '<Precision,2:2><Standard Format,0>')*"Qty. to Receive")

    FORMAT(amortize, 0, '<Precision,2:2><Standard Format,0>') <-- text
    "Qty. to Receive" <-- decimal
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Options
    BeliasBelias Member Posts: 2,998
    i should have refreshed the page before posting? #-o
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Options
    DarkHorseDarkHorse Member Posts: 389
    Thanks also for your interest.
Sign In or Register to comment.