Page 1 of 1

Logical Operator as paramater

Posted: Fri Apr 17, 2020 10:09 am
by MarenC
Hi,

is it possible to have a parameter for a logical operator and pass this into the TI code.

So for example, pOperator is >

And in the TI code the formula would be:

If(1 pOperator 2);

Do something;

Endif;

I want to create a process that can dynamically cater for different operators and was looking for a solution that didn't involve loads of If statements

Maren

Re: Logical Operator as paramater

Posted: Fri Apr 17, 2020 11:09 am
by Wim Gielis
You can have a String parameter pOperator, but still you cannot turn ">" into the operator "greater than".
You will need to write IF statements, and depending on the pOperator parameter, write down the logic to be followed by TI.