Hi Erik,
I’m trying to find some more information on what kind of expressions can I use in the Expression Editor? Specifically I’m looking at Calculated Fields and wanting to know if there is specific formats/limitations on this?
As a live example, I am trying to create ‘Amount LCY’ fields on all pages (eg. Sales Order List, Sales Invoice List) to calculate Amount LCY based on different Currency Codes. Eg. if Currency Code is EUR, then “Amount” x “Currency Factor”, if Currency Code is GBP, then “Amount” (do nothing).
Do you have any articles on this you could share?
Cheers,
Jack
But that should work, because currency factor is always set as 1 if the currency is your local currency. So there’s no reason for an “if”.
When you’re upgraded to BC25, you can use the ternary operation:
The Simple Object Designer expression verifier will not understand it, so if you write it wrong, it not be detected before you try to publish.
Hi Erik,
Normally I would agree, however our local currency is showing as 0? I would agree that this needs to be 1 for logic (it is a seperate issue), but in this case I would need to look at an ‘IF’ or ‘SWITCH’ type expression.
Do you have any references for expressions that will work in the Expression Editor? Examples of IF, SWITCH or others (basic ones) that we could take a look at for example purposes?
To solve this issue,
IF currency is Base = ‘Amount’
ELSE IF currency is USD = ‘Amount’ * ‘Currency Factor’
ELSE currency is EUR = ‘Amount’ * ‘Currency Factor’
(Please excuse the draft).
Thanks again (and loving using the Simple Object Designer).
– Jack