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
manjit.1486 said:I am using text() or any function in type!{urn:com:appian:types}Test'().
What exactly do you mean with this?
- What do you want to achieve?
- What did you do to achieve this?
- What do you observe?
- What is the deviation?
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" ) ), )
Note: This fixed and fn!text function works properly outside type! function. Please see the below screenshot. But when I used this code in type! it won't work.
May i know the type of "quantity" field?
Number
I mean number(integer) or number(decimal)?
I think that the issue here is that fixed() and text() return a string, but not a number. If you want to DISPLAY the final sum to the user in a specific format, do that at the place where you display it, but not when calculating it.