How to remove minus(-) before the number from the below code?

Code

-------------------------

a!localVariables(
local!currencyValue: a!currency(
isoCode:"USD",
value:-152552.774,
format:"SYMBOL",
decimalPlaces:2,
indicatorAlignment: "START"
),
stripwith(
local!currencyValue,
"$"
)
)

Output

--------------------------

"(152,552.77)"

I need the output as "152,552.77".Can some one help to rectify the code

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    a!localVariables(
      local!currencyValue: a!currency(
        isoCode:"USD",
        value:-152552.774,
        format:"SYMBOL",
        decimalPlaces:2,
        indicatorAlignment: "START"
      ),
      stripwith(
        stripwith(
          local!currencyValue,
          "$"
        ),
        "()"
      )
    )

    Additional strip with would work fine on the output.

    Have you tried fixed function instead?

    stripwith(
      fixed(
        "-152552.774",
        2
      ),
      "-"
    )

Reply
  • 0
    Certified Senior Developer

    a!localVariables(
      local!currencyValue: a!currency(
        isoCode:"USD",
        value:-152552.774,
        format:"SYMBOL",
        decimalPlaces:2,
        indicatorAlignment: "START"
      ),
      stripwith(
        stripwith(
          local!currencyValue,
          "$"
        ),
        "()"
      )
    )

    Additional strip with would work fine on the output.

    Have you tried fixed function instead?

    stripwith(
      fixed(
        "-152552.774",
        2
      ),
      "-"
    )

Children
No Data