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 Reply
  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

     fn!text(
                  fixed(
                    abs(
                      sum(
                        index(
                          local!data,"amount",{}
                        )
                      )
                    ),
                    2
                  ),
                  "00.00"
                )

    The above code I am using for calculate amount. Basically I want values after decimal or format that I mentioned in the code. But when I use above code in type! function it round up the amount.


    'type!{urn:com:appian:types:KIO}KIO_DSE_CASE'(
    quantity:if(
                rule!GLB_isBlank(
                  index(local!data, "bciCalcSplitAmount_dec", {})
                ),
                {},
                fn!text(
                  fixed(
                    abs(
                      sum(
                        index(
                          local!data,"amount",{}
                        )
                      )
                    ),
                    2
                  ),
                  "00.00"
                )
              ),
    )

Children