Currency

Hi People, 

 I have input task USD 12345789. I want to put comma between the amount based on currency and I want output like USD 1,23,456.89. I tried several logics but not worked and output is USD1234,567.89. Can anyone help me? Thanks in advance. 

  Discussion posts and replies are publicly visible

Parents Reply
  • Thank You Stefan. 

    a!localVariables(
    local!amount: 1234567.89,
    local!currency: "USD",

    local!formattedAmount: if(
    local!currency = "INR",

    left(text(floor(local!amount), "#,##,##0")) & "." & right(text(local!amount, "0.00"), 2),


    a!localVariables(
    local!intPart: floor(local!amount),
    local!decimalPart: right(text(local!amount, "0.00"), 2),


    local!intFormatted: text(local!intPart, "#,###"),


    local!intFormatted & "." & local!decimalPart
    )
    ),

    local!formattedAmount
    )

Children
No Data