SCALE Function
Description: Counts the number of significant digits to the right of the decimal point. For example, the SCALE for a source text value of 123.50 will be 1. Any characters other than a leading sign and a decimal point will cause the value to be considered invalid.
Parameters: String
- Source text: The string containing the number to be counted.
Return: Integer containing the number of significant digits. If the value is not a number, -1 will be returned.
Syntax: SCALE (<source text>)
Example: Count the number of decimal digits in the Amount data element. If Amount contains two significant digits, set the value of Amount scale to 2.
if( SCALE( DE("Amount").getValue( ) ) == 2 ) then
{
DE("Amount scale").setValue( "2" );
}
{
DE("Amount scale").setValue( "2" );
}
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*