...
You need a cube with a large amount of dims to build/modify the TI, but this is the data tab, you can use the function Value_Is_String to find out if the cell you're processing is String or Numeric and then NumbertostringEX to format the numeric how you like
Unfortunately, as you can't use an EXPAND on the left hand side of the = sign you are restricted to if triangle on the import:
Code: Select all
IF ( nDimCount = 2);
IF ( CellIsUpdateable ( pCubeName , V1 , V2 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V2 ) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 );
ENDIF;
ENDIF;
ELSEIF ( nDimCount = 3);
IF ( CellIsUpdateable ( pCubeName , V1 , V2 , V3 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V3 ) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 , V3 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 , V3 );
ENDIF;
ENDIF;
ELSEIF ( nDimCount = 4 );
IF ( CellIsUpdateable ( pCubeName , V1 , V2 , V3 , V4 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V4) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 , V3 , V4 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 , V3 , V4 );
ENDIF;
ENDIF;
ELSEIF ( nDimCount = 5 );
IF ( CellIsUpdateable ( pCubeName , V1 , V2 , V3 , V4 , V5 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V5 ) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 , V3 , V4 , V5 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 , V3 , V4 , V5 );
ENDIF;
ENDIF;
ELSEIF ( nDimCount = 6 );
IF ( CellIsUpdateable ( pCubeName , V1 , V2 , V3 , V4 , V5 , V6 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V6 ) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 , V3 , V4 , V5 , V6 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 , V3 , V4 , V5 , V6 );
ENDIF;
ENDIF;
ELSEIF ( nDimCount = 7);
IF ( CellIsUpdateable ( pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V7 ) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 , V3 , V4 , V5 , V6 , V7 );
ENDIF;
ENDIF;
ELSEIF ( nDimCount = 8);
IF ( CellIsUpdateable ( pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V8 ) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 );
ENDIF;
ENDIF;
ELSEIF ( nDimCount = 9);
IF ( CellIsUpdateable ( pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V9) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 );
ENDIF;
ENDIF;
ELSEIF ( nDimCount = 10);
IF ( CellIsUpdateable ( pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V10 ) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 );
ENDIF;
ENDIF;
ELSEIF ( nDimCount = 11);
IF ( CellIsUpdateable ( pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 , V11 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V11 ) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 , V11 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 , V11 );
ENDIF;
ENDIF;
ELSEIF ( nDimCount = 12);
IF ( CellIsUpdateable ( pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 , V11 , V12 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V12 ) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 , V11 , V12 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 , V11 , V12 );
ENDIF;
ENDIF;
ELSEIF ( nDimCount = 13);
IF ( CellIsUpdateable ( pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 , V11 , V12 , V13 ) = 1) ;
IF (DTYPE ( sMeasureDimName , V13 ) @= 'N');
CellIncrementN ( StringToNumber( vValue) , pCubeName , V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 , V11 , V12 , V13 );
ELSE;
CellPutS ( vValue , pCubeName, V1 , V2 , V3 , V4 , V5 , V6 , V7 , V8 , V9 , V10 , V11 , V12 , V13 );
ENDIF;
ENDIF;
ENDIF;
ENDIF;