Siebel Advisor API Reference > Utility Functions for Siebel Advisor >
ConvertFloatToCurrency
Usage
Use the ConvertFloatToCurrency function to display numbers in output targets in currency format, to two decimal places. If you do not use the ConvertFloatToCurrency function, you must write a custom function to format and display output target numbers in currency format. Use ConvertFloatToCurrency by itself or inside a BuildTarget function to format values before they appear in the application. Syntax
ConvertFloatToCurrency(value)
|
|
value |
Value to be converted, in floating-point form. |
Example
The following sample code uses ConvertFloatToCurrency with the BuildTarget function to convert and return numbers in currency format: <SCRIPT language="JavaScript">
document.write(ISS.BuildTarget("TEXT",window,"PRICE", ISS.ConvertFloatToCurrency));
</SCRIPT>
In this example, ConvertFloatToCurrency returns numbers in text output targets in currency format. For example:
- 31.1 would return 31.10
- 20 would return 20.00
- 20.50 would return 20.50
- 20.605 would return 20.61
Related TopicsRelated Topics
BuildTarget.
|