TI datatype problem?

Post Reply
mweldon
Posts: 18
Joined: Mon Sep 20, 2010 4:53 pm
OLAP Product: TM1 + Executive Viewer
Version: TM1 9.1.4
Excel Version: 2007

TI datatype problem?

Post 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
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: TI datatype problem?

Post by lotsaram »

Change the data type of "Value" to string.
mweldon
Posts: 18
Joined: Mon Sep 20, 2010 4:53 pm
OLAP Product: TM1 + Executive Viewer
Version: TM1 9.1.4
Excel Version: 2007

Re: TI datatype problem?

Post by mweldon »

brilliant, I thought it would be something obvious!

Many thanks

-Marc
Post Reply