Difference between revisions of "Displaying a Number Value as Currency"
(2 intermediate revisions by 2 users not shown) | |||
Line 27: | Line 27: | ||
|@format(SampleField,currency,INR)@ | |@format(SampleField,currency,INR)@ | ||
|₹300.00 | |₹300.00 | ||
+ | |- | ||
+ | |@format(SampleField,currency,FRCA)@ | ||
+ | |300,00 $ | ||
|} | |} | ||
<br /> | <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. | 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== | ==XML data== | ||
Line 63: | Line 71: | ||
* [[Number Format]] | * [[Number Format]] | ||
− | [[Category: | + | [[Category:To Move Later]] |
Latest revision as of 12:34, 20 October 2017
Contents
Fields containing number values can be displayed in currency formats in other custom fields such as Web Page View fields using the following syntax:
@format(FIELD NAME,currency,CURRENCYCODE)@ where FIELD NAME is the name of the field being referenced and CURRENCYCODE is the three-letter currency code used by ISO 4217
Therefore, a field named SampleField containing the value 300 can be displayed as follows:
Variable Used | Value will be displayed as... |
@format(SampleField,currency,USD)@ | $300.00 |
@format(SampleField,currency,EUR)@ | €300.00 |
@format(SampleField,currency,JPY)@ | ¥ 300 |
@format(SampleField,currency,ZAR)@ | R 300.00 |
@format(SampleField,currency,INR)@ | ₹300.00 |
@format(SampleField,currency,FRCA)@ | 300,00 $ |
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:
<!--@sslogic("@type@"="Special")-->(minimum @FORMAT(Minimum Request Amount,currency,FRCA)@ CAD)<!--@end-->
XML data
For XML Data node values you must place the syntax before the node.nodevalue.
For example if the node is as follows:
@xml.SampleField.staff.subtotal.y1-amount.nodevalue@
To display as currency you should use:
@xml.SampleField.staff.subtotal.currency_eur(y1-amount.nodevalue)@
Therefore, a field named SampleField containing the value 300 can be displayed as follows:
Variable Used | Value will be displayed as... |
@xml.SampleField.staff.subtotal.currency_eur(y1-amount.nodevalue)@ | €300.00 |