---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideCurrencyValue - Scoped

# GlideCurrencyValue - Scoped {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The GlideCurrencyValue API provides methods that return the currency code and original currency from an associated GlideCurrencyParser.parse() call.

This class runs is in the `sn_currency` namespace.  
Note:  
There is no constructor for this class.

## GlideCurrencyValue - getAmount() {#ariaid-title2}

Returns the currency amount originally passed into the associated
GlideCurrencyParser.parse() call.
{#Scoped-GCV-getAmount__table_ich_cvt_rjb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 1. Parameters]

{#Scoped-GCV-getAmount__table_ich_cvt_rjb} {#Scoped-GCV-getAmount__table_jch_cvt_rjb__entry__2}

| Type | Description |
|-|-|
| String | Original currency passed into the parse() method. |
[Table 2. Returns]

{#Scoped-GCV-getAmount__table_jch_cvt_rjb}  
This example shows how to call the method.

    var gp = new sn_currency.GlideCurrencyParser(); 
    gp.setLocale("eng", "USA");  
    var cv = gp.parse("USD;1234.56"); 
    gs.info('Original currency amount: ' + cv.getAmount());

Output:

    Original currency amount: 1234.56

## GlideCurrencyValue - getCurrencyCode() {#ariaid-title3}

Returns the currency code used to parse the currency in the associated
GlideCurrencyParser.parse() call.
{#Scoped-GCV-getCurrencyCode__table_ivz_rqt_rjb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 3. Parameters]

{#Scoped-GCV-getCurrencyCode__table_ivz_rqt_rjb} {#Scoped-GCV-getCurrencyCode__table_jvz_rqt_rjb__entry__2}

| Type | Description |
|-|-|
| String | Three-letter ISO currency code used to parse the currency. |
[Table 4. Returns]

{#Scoped-GCV-getCurrencyCode__table_jvz_rqt_rjb}  
This example shows how to call the method.

    var gp = new sn_currency.GlideCurrencyParser(); 
    gp.setLocale(eng, USA); 
    var cv = gp.parse("USD";"1234.56"); 
    gs.info('Parsed currency code: ' + cv.getCurrencyCode());

Output:

    Parsed currency code: USD


