I want to write the following code in a TI Process -- but it keeps telling INVALID OPERATOR....
If ( vTestvalue in ('ABC', 'XYZ', 'MNL', 'rrr', ZZZ') & vType @= vTestType2 ) ;
DimensionElementComponentAdd (sDim, '',vTestValue,weight) ;
endif;
Is it that TM1 does not allow use of the "IN" clause ???
Thanks
This is correct, there is no "IN" clause.
You need to test your items within the brackets individually against vTestvalue. You can do this simplistically eg.
IF (
( vTestvalue @='ABC' %
vTestvalue @='XYZ' %
vTestvalue @='MNL' %
vTestvalue @='rrr' %
vTestvalue @=ZZZ' )
&
vType @= vTestType2 ) ;
DimensionElementComponentAdd (sDim, vConsolidation, vTestValue, sWeight) ;
ENDIF;
The "%" represents an "OR" function. I noted you missed a parent value, so have added "vConsolidation" in your DimensionElementComponentAdd statement.
HTH
Ajay