Difference between revisions of "Displaying a Number Value as Currency"

From SmartWiki
Jump to: navigation, search
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
__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:
 
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:
  
Line 6: Line 7:
 
  and ''CURRENCYCODE'' is the three-letter currency code used by [http://en.wikipedia.org/wiki/ISO_4217 ISO 4217]
 
  and ''CURRENCYCODE'' is the three-letter currency code used by [http://en.wikipedia.org/wiki/ISO_4217 ISO 4217]
  
Therefore, a field containing the value ''300'' can be displayed as follows:
+
Therefore, a field named ''SampleField'' containing the value ''300'' can be displayed as follows:
  
{| border="1"
+
{| border="1" cellpadding="4"
|Variable Used
+
|'''Variable Used'''
|Value will be displayed as...
+
|'''Value will be displayed as...'''
 
|-
 
|-
|Organization, Search People
+
|@format(SampleField,currency,USD)@
|People: internal and external, related companies, standard and custom fields.
+
|$300.00
 
|-
 
|-
|Communications, Contacts
+
|@format(SampleField,currency,EUR)@
|External people only - limited search capabilities.
+
|€300.00
 
|-
 
|-
|[[Universal Tracking Application]] > Contact Tab
+
|@format(SampleField,currency,JPY)@
|Same page as the ''Search People'' page.
+
|¥ 300
 
|-
 
|-
|[[Universal Tracking Application]] > Company Tab
+
|@format(SampleField,currency,ZAR)@
|Same functionality as the ''Search People'' page, but with companies.
+
|R 300.00
 
|-
 
|-
|Sales Tracking Application > Company Tab
+
|@format(SampleField,currency,INR)@
|Same page as the Company tab in the [[UTA]]
+
|₹300.00
 
|-
 
|-
|Sales Tracking Application > Contacts Tab
+
|@format(SampleField,currency,FRCA)@
|Same page as the ''Search People'' page
+
|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 [[Custom_Field_Type:_Special_-_XML_Data|XML Data]] node values you must place the syntax before the ''node.nodevalue''.
 +
 
 +
 
 +
For example if the node is as follows:
 +
 
 +
<pre>@xml.SampleField.staff.subtotal.y1-amount.nodevalue@</pre>
 +
 
 +
To display as currency you should use:
 +
 
 +
<pre>@xml.SampleField.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...'''
 +
 
 
|-
 
|-
|Sales Tracking Application > My Contacts
+
 
|Limited to contacts associated with companies where the current user is the owner.
+
|@xml.SampleField.staff.subtotal.currency_eur(y1-amount.nodevalue)@
 +
 
 +
|€300.00
 +
 
 
|}
 
|}
  
[[Category:Variables]][[Category:Currency]]
+
 
 +
==See Also==
 +
* [[Number Format]]
 +
 
 +
[[Category:To Move Later]]

Latest revision as of 13:34, 20 October 2017

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


See Also