TM1 ZeroOut View TI Process Code Help
Posted: Tue Feb 06, 2018 2:20 am
Hi there, I need to create a view to zero out. For some reason, the second condition did not work, could anybody help to pinpoint the problem in my TI process? I want h_accounts dim's subset to include all accounts with first digit as '1", but not include accounts last four digit as '1000' such as 1090-1000 and 1190-1000 should be excluded. It appears that all accounts not starting with 1 got excluded correctly, but second condition did not work. Any suggestion would be highly appreciated.
Code: Select all
[ELSEIF(vTgtDim @= 'h_accounts');
IF(SUBSETEXISTS(vTgtDim, vTgtSub) = 0);
SUBSETCREATE(vTgtDim, vTgtSub);
ENDIF;
vTgtStartIndex = 1;
While(vTgtStartIndex<=DIMSIZ(vTgtDim));
vTgtElement = DIMNM(vTgtDim, vTgtStartIndex);
IF((ELLEV(vTgtDim, vTgtElement) = 0));
IF(SUBST(vTgtElement,1,1)@='1'&SUBST(vTgtElement,6,4)@<>'1000');
SubsetElementInsert(vTgtDim, vTgtSub, vTgtElement, 1);
ENDIF;
ENDIF;
vTgtStartIndex = vTgtStartIndex + 1;
END;[code]