Page 1 of 1

Turbo Integrator: Any way to use or in an IF statement?

Posted: Mon Sep 20, 2010 2:26 pm
by ChrisF79
Very new question here but I have a lot of IF statements that could be minimized if I could use OR within the first part of the clause. What I'm trying to write is something like, "If entity is 1000 or 5000, do this..." Currently I'm doing:

Code: Select all

IF(entity @= '1000');
  ... do something;
ENDIF;
IF(entity @= '5000');
   ... do something (same as above);
ENDIF;
I'm using Turbo Integrator 9.4.1. Thanks!

Re: Turbo Integrator: Any way to use or in an IF statement?

Posted: Mon Sep 20, 2010 2:38 pm
by jrizk
Hi.

IF ( entity @= '1000' % entity @= '5000' );
... do something;
ENDIF;

check out Tm1 help on 'logical operators'

Re: Turbo Integrator: Any way to use or in an IF statement?

Posted: Mon Sep 20, 2010 2:40 pm
by jrizk
& = AND eg (Value1 > 5) & (Value1 < 10) Returns TRUE if the value is greater than 5 and less than 10.
% = OR eg (Value1 > 10) % (Value1 < 5) Returns TRUE if the value is greater than 10 or less than 5.
~ = NOT eg ~(Value1 > 5) Equivalent to (Value1 <= 5)

Re: Turbo Integrator: Any way to use or in an IF statement?

Posted: Mon Sep 20, 2010 2:44 pm
by ChrisF79
Perfect, thank you! I remembered us going over it in a class I took but I couldn't find it anywhere. Thanks a lot!

Re: Turbo Integrator: Any way to use or in an IF statement?

Posted: Mon Mar 12, 2012 6:21 am
by SueZhaZa
jrizk wrote:& = AND eg (Value1 > 5) & (Value1 < 10) Returns TRUE if the value is greater than 5 and less than 10.
% = OR eg (Value1 > 10) % (Value1 < 5) Returns TRUE if the value is greater than 10 or less than 5.
~ = NOT eg ~(Value1 > 5) Equivalent to (Value1 <= 5)


Gee Thanks.. i know i'm bit outdated with the post but its helpful..
Actually i need to know more on picking up subset using csv files whereby some of the cell is either null or empty..
Thanks again! :D :D :D

Re: Turbo Integrator: Any way to use or in an IF statement?

Posted: Mon Mar 12, 2012 9:32 am
by Christopher Kernahan
Hi SueZhaZa,

Welcome to the forum.
Actually i need to know more on picking up subset using csv files whereby some of the cell is either null or empty..
Your question doesn't make sense to me; I suggest you create a new topic and provide more info as described in the How To Post Thread http://www.tm1forum.com/viewtopic.php?f=3&t=1037

Re: Turbo Integrator: Any way to use or in an IF statement?

Posted: Mon Mar 26, 2012 4:04 am
by SueZhaZa
yup.. i already did and manage to solve it... Love the helps this forum provides.. Superb!

http://www.tm1forum.com/viewtopic.php?f=3&t=7094