Logical Operator as paramater

Post Reply
MarenC
Regular Participant
Posts: 447
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Logical Operator as paramater

Post 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
Wim Gielis
MVP
Posts: 3239
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Logical Operator as paramater

Post 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.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply