Projects can specify default currencies, flow-types, tied-status and so-on, which should cascade down to apply to transactions/budgets etc. unless they specify an alternative. Applications need some logic to cope with this (I've not found a good way to handle this in XSLT yet if it has to also allow for the possibility that the defaults are absent)
Default values
Have more questions? Submit a request
-
Chris Wallace Default cascades like this can be represented in XPath with expressions such as
($transaction/value/@currency,$transaction/../@default-currency,"USD")[1]
This is a sequence of the transaction currency, the activity default currency and "USD" [1] selects the first non-null value.
Note that currency="" in a transaction value , whilst valid according to the schema not only fails referential integrity against the Currency codelist but also makes this default cascade fail and hence requires more complex programming
Article is closed for comments.
1 Comments