-
#6009 |
What’s the correct syntax to get this to work in the GotoIf block.
I have a DB query:select count(*)
from crs
where worktel=${CALLERID(num)}
or hometel=${CALLERID(num)}
or mobiletel=${CALLERID(num)}Then I loop around until all the items are read out by SWIFT, using…
select item,status,que,price,job,statusnum
from crs
where worktel=${CALLERID(num)}
or hometel=${CALLERID(num)}
or mobiletel=${CALLERID(num)}
limit 1
offset ${count}However in the GotoIf block I put:
$ “0”” rel=””>”${price}” > “0” and
($”${statusnum}” = “80” or
$”${statusnum}” = “90” or
$”${statusnum}” = “100” or
$”${statusnum}” = “110” or
$”${statusnum}” = “120” or
$”${statusnum}” = “130” or
$”${statusnum}” = “140” or
$”${statusnum}” = “150” or
$”${statusnum}” = “160” or
$”${statusnum}” = “165” or
$”${statusnum}” = “170” or
$”${statusnum}” = “190” or
$”${statusnum}” = “210” or
$”${statusnum}” = “280” or
$”${statusnum}” = “290” or
$”${statusnum}” = “360”)So if the “statusnum” IS one of the numbers listed in my OR list – I need it to read out the price. However if the price IS greater than Zero and the ststusnum IS NOT listed – it STILL carries on and does NOT branch off as I would expect, so I can get SWIFT to read out just the status and NOT the price.
Where am I going wrong in my logic?
Cliff.
#6010 |Don’t know why that didn’t copy and paste correctly before – but the begining of my GotoIf block actually reads:
$[“${price}” > “0” ….
#6011 |I think you should use “&” and “|” instead of “and” and “or” as logical operators.
Bernard
#6012 |Thanks for the heads up….
I also found that I was putting in FAR TOO much information.
The actual syntax needed to be:$[“${price}”>”0″&$”${statusnum}”=”80″|”90″|”100″|”110″|”120″|”130″|”140″|”150″|”160″|”165″|”170″|”190″|”210″|”280″|”290″|”360″]
Now it works as expected.
Cliff.
You must be logged in to reply to this topic.