Page 1 of 1

TI datatype problem?

Posted: Wed Sep 22, 2010 8:10 am
by mweldon
Hi

I am currently a bit stuck on a TI process that doesn't always work.

All I am doing is moving some user entered data onto different elements within the same dimension. The data source is a TM1 view, in the prolog I send some elements and subsets to the source view. All the items in the Variables tab are set to Other. This process runs as part of a chore.

In my data tab, I have the following code:

#Read attribute value
vReqDestination = ATTRS(sDimReqMat, vRequisition, 'Mapped Requisition - Tag');
vPurchaseOrderDestination = ATTRS(sDimReqMat, vRequisition, 'Mapped Purchase Order');

IF( VALUE_IS_STRING=1 );
CellPutS( SVALUE , sCubeMat , vProject , vCostcode , vReqDestination, vPurchaseOrderDestination, vPeriod , vMeasure ) ;
CellPutS( '' , sCubeMat , vProject , vCostcode , vRequisition, vPurchaseOrder, vPeriod , vMeasure ) ;
ELSE;
CellPutN( NVALUE , sCubeMat , vProject , vCostcode , vReqDestination , vPurchaseOrderDestination , vPeriod , vMeasure ) ;
CellPutN( 0 , sCubeMat , vProject , vCostcode , vRequisition , vPurchaseOrder , vPeriod , vMeasure ) ;
ENDIF;


I have 7 measures (vMeasure) in the view subset - all except the last element are N elements. This is where I receive the problem. On the final string element, if there is a string in the cell then I receive the error:
Data source line (1) Error: Data procedure line (0): Cannot convert field number 7, value "test" to a real number

Incidentally, if there is a number in that string cell, then the process works fine and it moves it.
The data on the other measures elements moves correctly, so it is just a problem with this measure.

I expected that the VALUE_IS_STRING argument would avoid this problem, is it likely that I have missed something?

thanks

-Marc

Re: TI datatype problem?

Posted: Wed Sep 22, 2010 10:02 am
by lotsaram
Change the data type of "Value" to string.

Re: TI datatype problem?

Posted: Wed Sep 22, 2010 10:27 am
by mweldon
brilliant, I thought it would be something obvious!

Many thanks

-Marc