Adding Currency Selectors to Views

The core provides a standard form/console control to select the Payment Currency .

  • The control displays currencies defined in the Archibus Currencies table.
  • The selected value is saved into a field with Archibus Type = Currency.

pay_currency_control.gif

The control can be used on:

  • Form panels : to allow the user to edit currency fields such as cost_tran.transaction_currency .
  • Console panels : to allow the user to select the currency for reports that display converted or filtered cost values.

You add the control to form or console panels, define a form/console field bound to a database text field that validates on the Archibus Currencies table.

<field table="cost_tran" name="payment_currency"/>

For console panels, you can set the default field value to be a specific currency, the Budget Currency, or the User-Default Currency:

value="USD"
value="${project.budgetCurrency.code}"
value="${user.userCurrency.code}"

You can also use Java Script to access the selected currency value (for example, 'Euro'), and to pass it as a data source parameter to the target panel or report:

var currency = this.form.getFieldValue(
'cost_tran.payment_currency);
this.report.addParameter('paymentCurrency', currency);
this.report.refresh();