Changes

Displaying a Number Value as Currency

548 bytes added, 17:34, 20 October 2017
no edit summary
__TOC__
Fields containing number values can be displayed in currency formats in other [[custom fields]] such as [[Custom Field Type: Display Only – Web Page View|Web Page View]] fields using the following syntax:
Therefore, a field named ''SampleField'' containing the value ''300'' can be displayed as follows:
{| border="1" cellpadding="4"
|'''Variable Used'''
|'''Value will be displayed as...'''
|@format(SampleField,currency,ZAR)@
|R 300.00
|-
|@format(SampleField,currency,INR)@
|₹300.00
|-
|@format(SampleField,currency,FRCA)@
|300,00 $
|}
<br />
By default, currency formatting will only be displayed when a record is in [[view mode]]. Currency formatting will be applied when the record is in [[edit mode]] only if the setting "Show Currency Format in Edit Mode" is selected in the custom field settings.
 
Example used within sslogic:
<pre>
<!--@sslogic("@type@"="Special")-->(minimum @FORMAT(Minimum Request Amount,currency,FRCA)@ CAD)<!--@end-->
</pre>
==XML data==
For example if the node is as follows:
<pre>@xml.srcSampleField.staff.subtotal.y1-amount.nodevalue@</pre>
To display as currency you should use:
<pre>@xml.srcSampleField.staff.subtotal.currency_eur(y1-amount.nodevalue)@</pre> Therefore, a field named ''SampleField'' containing the value 300 can be displayed as follows:{| border="1" cellpadding="4" |'''Variable Used''' |'''Value will be displayed as...''' |- |@xml.SampleField.staff.subtotal.currency_eur(y1-amount.nodevalue)@ |€300.00 |}
* [[Number Format]]
[[Category:Variables]][[Category:CurrencyTo Move Later]]
Smartstaff, administrator
687
edits