{if} function query

Can it have {if: x="" AND y=""} or {if: x="" OR y=""}

Yes, you can.

Here is more information:

Thanks. I tried using this:

{dbselect: SELECT FirstName, Region FROM AddressBook ORDER BY FirstName ASC LIMIT 750; space=7izj0Hpo8D9JLSzgo2YogI; multiple=yes; menu=yes}{=join(FirstName, ", ")}

{formmenu: default=1; 2; 3; 4; 5; 6} x {dbselect: SELECT Colourway FROM Colourways ORDER BY Colourway ASC LIMIT 900; space=02HdgZGm0jNamFkoQbvhd3; menu=yes; trim=yes}{=Colourway} {import: /inx}
{cursor}
{formtoggle: name=PayPal; default=yes}{endformtoggle}{if: paypal=yes}Postage: {formmenu: Royal Mail International Tracked @ £; default=Royal Mail Tracked48 @ £3.55; Royal Mail Tracked24 @ £4.45; name=options}
{if: options="Royal Mail International Tracked @ £" and region="USA"}Note: Postage to USA includes Customs Tariff charge{endif}

When previewed, the name selected from the AddressBook has Region USA but the if function doesn't seem to recognise the region

I have got around it by adding a USA toggle but am interested in why the If...and..didn't work.

Hard to tell without seeing the data. It's most likely due to some difference in the text content. E.g. different capitalization, extra whitespace, or something like that.

To be equal, the two strings have to be exactly equal. You can add some other checks to the snippet, like ("Is region USA: {=region="USA"}") to help debug it.

If I use ("Is region USA: {=join(region, ", ")}="USA""), I get ("Is region USA: USA="USA"")

Think i've got it working with {if: {=join(region, ", ")="USA"}}. Thanks