I have a text field which takes decimal values , i want to restrict(put validation) the field with precision of 22 which means user is allowed to enter 13 digits before decimal and 9 digits after decimal point not more than that . Also, i want to store the value as it is (no round off) .
Please can somebody help me with this .
Thanks in advance.
Discussion posts and replies are publicly visible
I would do an expression rule that receives a text and do the checks making use of the following supporting functions:
split() - to find separate the arrays before and after the decimal point
lenght() to see the number of numbers on each of the arrays returned from split
Then I would stored as a text to make sure you dont lose precision
Hi, Thank you for you response - I am using split function and comparing the length but not sure why appian converts the value into exponential form . How do i retain the original value ?
I dont know what you are doing as you are only showing the test inputs....
anyways, if you have it with the exponential it means that at some point you are not working with a string, but rather with a number. As well, if the test inputs you might want to write "12.12312" instead of the number directly
© 2024 Appian. All rights reserved.