The function todecimal is not maintaining the precision I need. I have a simple

The function todecimal is not maintaining the precision I need. I have a simple currency component defined on a SAIL form (similar to what is in the reciped), but the user may enter fairly large numbers. The issue is when the fn!todecimal is called on the saveinto we lose our precision when the number is of a certain size. For example:
todecimal(56555.25) returns 56555.25 but todecimal(567555.25) returns 567555.3

We do not want the value to be rounded, and instead want to maintain our precision. Is there a way around this?...

OriginalPostID-119050

OriginalPostID-119050

  Discussion posts and replies are publicly visible

Parents
  • The value that will be saved to your actual process variable will be the right one. You are seeing the rounded value because you're redesiplaying the value somewhere right? but once the form is submitted check and confirm the saved value is indeed the expected one (check the process variables tab).

    If you want to display it without the rounding use the fixed() function to set the precision. This is just for display purposes since the function returns text.
Reply
  • The value that will be saved to your actual process variable will be the right one. You are seeing the rounded value because you're redesiplaying the value somewhere right? but once the form is submitted check and confirm the saved value is indeed the expected one (check the process variables tab).

    If you want to display it without the rounding use the fixed() function to set the precision. This is just for display purposes since the function returns text.
Children
No Data