A currency value represents monetary values. It has two properties:

  • The currency property is a decimal value or the value NOT_SET
  • The string property is a string that holds either a 3-character ISO 4217 code  

For example, the following expression is valid at runtime:

MakeCurrency(10.50,"USD") 

This expression evaluates to a currency value with an amount of 10.50 and currency code of ‘USD’. 

Obtaining the symbol for a currency

There is no “Symbol” property for a currency. However, you can use an expression to return the correct currency symbol:

GetCurrencySymbol(MakeCurrency(5.0,”USD”))

This expression returns $.

Add a currency variable to a task sequence

In a task sequence, you can add a currency variable to an Update Data data action. For example, 

  1. From the Toolbox, expand the Data category and drag an Update Data action to the desired location in the task.
  2. On the Update Data design form, in the Name field, add a meaningful name to describe the item.
  3. Click the Add update statement button and select Currency.
  4. In the Variable Name field, type the label to identify the variable on tasks.
  5. To set the values in literal mode, in the Value To Assign field, do the following:
    1. Click the + or buttons to set the desired value.
    2. Click the arrow at the end of the currency symbol drop-down list and select the appropriate 3-character currency value.
  6. To set the value using an expression, in the Value To Assign field, click the expression button and do one of the following:
    • Add the expression inline.
    • Click the Edit Expression button to open the Edit Expression Editor and build your expression.
  7. To optionally add another variable, click the Add update statement button.