I get the httpResponse with a decimal field as 1.0000, but when a!fromJson parses the response bode and returns 1. How can I process it? and pass a decimal value to api with the needed number of decimal places?
Discussion posts and replies are publicly visible
So: the api that you need to pass the value to - what type is the value expected to be passed as? If it's a decimal then passing 1 to it will be fine. If the type is text but it is only ever expecting a string that conforms to a decimal format then you can use the fixed() function to force 4 decimal places if needed.
It can be different number of decimal spaces 4, 6, 10. I should pass it to request as it receive from another response
type is decimal, but we need to pass exactly decimal with trailing zeros...
Hi dariab0002Please try to use the fixed function provided by appian.https://docs.appian.com/suite/help/19.1/fnc_text_fixed.htmleg. fixed(1.0000,4)Only problem that you can face is that after using this function it converts the decimal to text.
We need a decimal type ... but with defined trailing zeros. It can be a different number (4,6,10) of decimal spaces.