Typecast not working

Certified Senior Developer

Hello Everyone,

I am using text() or any  function in type!{urn:com:appian:types}Test'(). But it seems not working. Can anyone suggest how I can do this?

Thanks

  Discussion posts and replies are publicly visible

Parents
  • If you're trying to convert a number to a string, you simply need "toString()".  text() does something altogether separate.

    Now if you're really needing to take a decimal and make sure your displayed amount is that decimal with a constant number of places, there are various rules available (check out the Appian Functions documentation for the master list, as always), but one of my favorites is "fixed()", which you feed a number and a "number of places" value and it outputs the decimal with that many places (returning a rendered text value).

Reply
  • If you're trying to convert a number to a string, you simply need "toString()".  text() does something altogether separate.

    Now if you're really needing to take a decimal and make sure your displayed amount is that decimal with a constant number of places, there are various rules available (check out the Appian Functions documentation for the master list, as always), but one of my favorites is "fixed()", which you feed a number and a "number of places" value and it outputs the decimal with that many places (returning a rendered text value).

Children
No Data