Page 1 of 1

Expressions & operators

Posted: 22 May 2022, 20:09
by labman
Hi,

I am using Sage 50c in the UK. I have created a commercial invoice which pulls in all the fields required inc. the different currencies. The problem I need to solve is to have the correct bank details displayed depending on the currency used in the invoice. I have a sterling bank account & a euro bank account. I am having a hard time getting information to show examples on this.

I want to implement the logic of: if currency = GBP then show Sterling account number, else show euro account number. Does anyone out know how to write this in the expressions?

Re: Expressions & operators

Posted: 23 May 2022, 09:54
by brucedenney
The expression construction is

LogicalTest?TrueAction: FalseAction

I would not do it that way though. It is fine for two currencies but if it is more or it there is a lot of text it just gets hard to see what it does.

Instead what I do is make multiple text boxes, set suppress print on them, then have a conditional format based on currency to undo the suppress print.

Stack them all on top of each other. Only the one matching the currency will print, you can include CHAPS SEPA BACS SWIFT details etc and be a bit more verbose.

Re: Expressions & operators

Posted: 24 May 2022, 06:24
by labman
That worked. Thanks.