Hi Houps,
I saw you registered earlier today, welcome to TM1 Forum!
I’m going to use the code-tag to make your script and mine easier to read.
If I understand right, you're trying to write the following rule:
Code: Select all
IF ( !Form{Flat @= DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4') );
['Measure{ST{CopyDataDetail':'4']=S:DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4');
ENDIF;
Appreciate what you're trying to do; You inadvertently created a hybrid of a rule and a turbo integrator script. This is evident by mixing of ['area statements'] - a hallmark of rules, and ENDIF; which is part of turbo integrator. TM1 doesn't quite work this way.
- Rules are applied to cubes.
- Turbo Integrator scripts are applied to processes.
Try this rule in cube
ST{02.03.CopyDataDetail -- newlines and tabs are added for readability.
Code: Select all
['Measure{ST{CopyDataDetail':'4'] = S: IF(
!Form{Flat @= DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4'),
DB('ST{02.02.CopyDataDetail',!Orgstructure,!Scenario,!Version,!Rows,'4'),
STET);
The if statement works just like an Excel IF(cond,true,false) statement.
Don't forget, you'll need a feeder in cube
ST{02.02.CopyDataDetail:
Code: Select all
SKIPCHECK;
# ... rules go here ...
FEEDERS;
# ... other feeders go here ...
# You need to substitute a value for XXXXX and YYYYY immediately below. You need to tell TM1 which Year{Month and Form{Flat to feed.
['Measure{ST{CopyDataDetail':'4'] => DB('ST{02.03.CopyDataDetail', !Orgstructure, !Scenario, !Version, 'XXXXX', 'YYYYY', !Rows, '4');
Also, in case you'd like more general pointers on TM1 rules,
I posted on this not too long ago.
Let us know how you make out.