problem with if?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Nagarules
Junior Coder
Posts: 24
Joined: Tue Nov 21, 2006 9:33 pm

problem with if?

Post by Nagarules » Thu Jun 28, 2007 9:24 pm

How do i make an if with more then 1 variable. for example

if> { (variable1 + variable2 + variable3) >200 OR (variable1 + variable2 + variable3)<10 }

I'm trying to achieve something like this.

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Jun 28, 2007 10:01 pm

Remove all the spaces, put percents around all your variable names and organize the statement with parentheses. Try something like this:

Let>variable1=1
Let>variable2=1
Let>variable3=1

if>{((%variable1%+%variable2%+%variable3%)>200)OR((%variable1%+%variable2%+%variable3%)accepted
Else
mdl>rejected
EndIf

Nagarules
Junior Coder
Posts: 24
Joined: Tue Nov 21, 2006 9:33 pm

hmm

Post by Nagarules » Fri Jun 29, 2007 10:25 am

if>{((natb.delay1%+%natb.delay2%+%natb.delay3%)>200)OR((%natb.delay1%+%natb.delay2%+%natb.delay3%)<10)}

I wrote this and i get the following errors:
unknown identifier natb, parsing error and another parsing error.
I also know for a fact these variables do exist.. so i dont know the problem?

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Jun 29, 2007 12:12 pm

You're missing a percent sign in front of natb.delay1

if>{((%natb.delay1%+%natb.delay2%+%natb.delay3%)>200)OR((%natb.delay1%+%natb.delay2%+%natb.delay3%)<10)}

Nagarules
Junior Coder
Posts: 24
Joined: Tue Nov 21, 2006 9:33 pm

^_^

Post by Nagarules » Fri Jun 29, 2007 12:54 pm

^_^ Oops.!

Great thanks!

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Jun 29, 2007 12:56 pm

You're welcome.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts