Hello all,
sort of new to ti processes and stuck.
i'm trying to export a cube that has comments and match those same cell to their value which is stored in another cube.
So far i have the following command but it is not working
ASCIIOUTPUT('C:\...\fil.csv', V1, V2, V3, V4, V5, V6, value, cellgetS('PNLCube', V2, V3, V4, V5) );
Pretty much what i'm trying to get as an output is:
V1 V2 V3 V4 V5 V6 value and the other corresponding value in PNLCUBE
Any help or guidance towards the right direction would be appreciated
thanks
Cellgetn and asciioutput
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Cellgetn and asciioutput
From the Request For Assistance Guidelines:bjones wrote: sort of new to ti processes and stuck.
i'm trying to export a cube that has comments and match those same cell to their value which is stored in another cube.
So far i have the following command but it is not working
ASCIIOUTPUT('C:\...\fil.csv', V1, V2, V3, V4, V5, V6, value, cellgetS('PNLCube', V2, V3, V4, V5) );
Pretty much what i'm trying to get as an output is:
V1 V2 V3 V4 V5 V6 value and the other corresponding value in PNLCUBE
Any help or guidance towards the right direction would be appreciated
I can make a guess, but in the absence of specifics it's only a guess.RFAG wrote: 4) Similarly if you're getting unexpected results, specifics of what you're running, how, and what results you're getting will yield a more valuable response than "I'm running a T.I. but my code doesn't work properly". If you're getting an error, please be specific about what the error is (full details, not just "a runtime error" or "process terminated with errors"), and the circumstances under which it's occurring.
You have Value as one of the arguments. I'm assuming that the data source is a cube view and that Value is numeric.
All of the arguments that you pass to AsciiOutput need to be strings. It doesn't do an implicit conversion of numeric to string. Accordingly you would need to wrap a conversion function like the Rules function Str() or the TI functions NumberToString or NumberToStringEx around Value to convert it.
All of this is based on the assumption that 'PNLCube' is the one that contains the comment, not the value. If that's not the case (and I would have expected something named PNLCube to have numbers rather than or in addition to comments) then you have things the wrong way around. If the data source is in fact the cube which has comments then Value will already be a string. You'd therefore need to be using CellGetN, not CellGetS, to get the value from PNLCube, then convert that to a string using one of the functions that I described above. CellGetN points to numeric cells and CellGetS to string cells; they don't convert the values that they retrieve into numbers or strings, as the case may be.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Posts: 24
- Joined: Tue Apr 08, 2014 4:17 pm
- OLAP Product: TM1
- Version: 10.2.1.1
- Excel Version: 2010
Re: Cellgetn and asciioutput
Thanks Alan,
Just read through the guidelines.
You're right it was a string vs number issue. the value is actually a string is the other value i get cellgetS that was a numeric. just added numbertostring
Thanks a lot
Just read through the guidelines.
You're right it was a string vs number issue. the value is actually a string is the other value i get cellgetS that was a numeric. just added numbertostring
Thanks a lot