Page 1 of 1
Equal sign not found error
Posted: Mon Apr 06, 2015 4:51 pm
by cherry4
Hi,
I am new to Tm1.. i am getting syntax error
VArchive Years = '2013';
VArchive Quarters ='Q1';
if (VALUE_IS_STRING=1, CellPutS(SVALUE,Tcube,Vlocation,Vyear,VCounter,Vassetp,VArchive Years,VArchive Quarters),
CellIncrementN(NVALUE,Tcube,Vlocation,Vyear,VCounter,Vassetp,VArchive Years,VArchive Quarters));
I am getting syntax error
Years='2013;
equal to sign not found
Re: Equal sign not found error
Posted: Mon Apr 06, 2015 5:29 pm
by tomok
cherry4 wrote:VArchive Years = '2013';
Is that a space I see between the words VArchive and Years? You can't have spaces in variable names. That is a cardinal rule in every programming language I've ever heard of.
Re: Equal sign not found error
Posted: Mon Apr 06, 2015 5:32 pm
by cherry4
HI,
My dimensions have space anyway i have removed the spaces it is saying variable undefined
Re: Equal sign not found error
Posted: Mon Apr 06, 2015 5:37 pm
by cherry4
Hi,
I have changed it without spaces it got saved but when i executed it saying
errorin meassage log that cell type is real
Re: Equal sign not found error
Posted: Mon Apr 06, 2015 5:45 pm
by Alan Kirk
cherry4 wrote:HI,
My dimensions have space anyway i have removed the spaces it is saying variable undefined
Tomok said, correctly, that you cannot have spaces in
Variable names. This has not the first thing to do with whether you have spaces in
Dimension names. (Which you shouldn't, nor should you use anything but alphanumeric characters or underscores, but that's a
separate discussion.)
cherry4 wrote:I have changed it without spaces it got saved but when i executed it saying
errorin meassage log that cell type is real
That usually means that you are trying to write a string value into a numeric cell. I note that you are doing the VALUE_IS_STRING=1 test, but that's testing what the value is in the data
source, which may not be the same as what it is in the
target cell.
Re: Equal sign not found error
Posted: Mon Apr 06, 2015 7:18 pm
by cherry4
Hi,
I have set variable to numeric and given only CELLINCREMENTN function but still i am getting this error
"850","2011 5YR Plan","1","Job No.","01580-20-36-04",Data Source line (1) Error: Data procedure line (0): Cannot convert field number 5, value "01580-20-36-04" to a real number.
Re: Equal sign not found error
Posted: Mon Apr 06, 2015 8:20 pm
by tomok
cherry4 wrote:I have set variable to numeric
First of all, you can't set a variable to numeric in TM1, there is no such setting. The variable type is determined by the value that is inside it. In your case, "01580-20-36-04" is a string so you can't write it to a numeric cell. You would have to convert it to a number first. What that would be is a mystery to me. 01580 minus 20 minus 36 minus 04???
Re: Equal sign not found error
Posted: Mon Apr 06, 2015 8:53 pm
by Alan Kirk
tomok wrote:cherry4 wrote:I have set variable to numeric
First of all, you can't set a variable to numeric in TM1, there is no such setting. The variable type is determined by the value that is inside it.
For a user defined variable, yes. But I suspect that cherry4 is referring to a data source variable's "Variable Type" setting.
tomok wrote: In your case, "01580-20-36-04" is a string so you can't write it to a numeric cell. You would have to convert it to a number first. What that would be is a mystery to me. 01580 minus 20 minus 36 minus 04???
Quite.
Cherry4, you can't just set a variable type and have it magically convert to that variable type. If you set the type to "Numeric" it has to BE something that can be read
directly as a number, which that expression cannot be. That means digits, a decimal separator, possibly thousands separators ONLY. Otherwise you have to parse the value to convert it to a number.
Incidentally, you haven't specified what your data source is. VALUE_IS_STRING only works when the data source is a cube view. I suspect that yours isn't.
Re: Equal sign not found error
Posted: Mon Apr 06, 2015 11:15 pm
by cherry4
Hi,
I have measure dimension which got 11 facts combination of strings and numbers ..I don't understand how to pass these values to target cube
Re: Equal sign not found error
Posted: Mon Apr 06, 2015 11:21 pm
by Alan Kirk
cherry4 wrote:Hi,
I have measure dimension which got 11 facts combination of strings and numbers ..I don't understand how to pass these values to target cube
It would help if we had
full details as described in the
Request For Assistance Guidelines.
At present we have no idea what your data source is, no idea what fields are coming through your data, no idea of what the dimensions of your cube are, and no idea what your measures are.
Re: Equal sign not found error
Posted: Mon Apr 06, 2015 11:46 pm
by cherry4
Consider Product dimension
in that in Job column i have:01580-20-36-04
Description:Records Management Sharepoint Software Implentation
Estimated Cost:1016851
Completion Date:15-May
these are elements in product dimension
How can copy these values to Target cube they are combination of string and numeric.