Page 1 of 1

How can i use subset in cellput/cellget function.

Posted: Fri Jan 13, 2017 1:35 pm
by tcelkk
Hi,
Can i do this? How can i call my subsets these functions?

Re: How can i use subset in cellput/cellget function.

Posted: Fri Jan 13, 2017 1:41 pm
by tomok
Why would you want to do this? Those functions are to get the resultant data from a single intersection in the cube. A subset would entail multiple intersections and would thus be NA. Are you talking about retrieving the sum of the intersections in a subset, much like the undocumented feature whereby you can pass a subset to a DBRW formula? I don't know if that also works for CELLGETN, highly doubt it, but you can always give it a try. Just pass the subset name in one of the parameters instead of the element name.

As to CELLPUTN using a subset wouldn't make any logical sense. How would TM1 know which intersection the data should be written to? Think about it.

Re: How can i use subset in cellput/cellget function.

Posted: Fri Jan 13, 2017 2:06 pm
by tcelkk
Hi tomok,

Thanks your answer.
İ need to do this because İ have to copy my data in cube from one element to another element. I create my view and some subsets in prolog. But i dont use subsets in these functions.

Re: How can i use subset in cellput/cellget function.

Posted: Fri Jan 13, 2017 2:20 pm
by tomok
tcelkk wrote:Hi tomok,

Thanks your answer.
İ need to do this because İ have to copy my data in cube from one element to another element. I create my view and some subsets in prolog. But i dont use subsets in these functions.
If the view you created in the prolog is the data source for the TI process then the TI will cycle through all the intersections for you in the Data tab and you don't have to use a CELLGETN as the data will already be in a variable for you. You just need to write a CELLPUTN to put it in the destination intersection. This is pretty basic TI stuff and is covered in the User Manual quite adequately.

Re: How can i use subset in cellput/cellget function.

Posted: Fri Jan 13, 2017 3:08 pm
by Wim Gielis
tomok wrote:I don't know if that also works for CELLGETN, highly doubt it, but you can always give it a try
It works fine. But it's undocumented by IBM.
http://users.skynet.be/fa436118/wim/tm1 ... dup_EN.htm

Re: How can i use subset in cellput/cellget function.

Posted: Fri Jan 13, 2017 6:14 pm
by tomok
Wim Gielis wrote:
tomok wrote:I don't know if that also works for CELLGETN, highly doubt it, but you can always give it a try
It works fine. But it's undocumented by IBM.
http://users.skynet.be/fa436118/wim/tm1 ... dup_EN.htm
Interesting, but I imagine it would need to be a public subset and not a private one.

Re: How can i use subset in cellput/cellget function.

Posted: Fri Jan 13, 2017 9:59 pm
by Wim Gielis
tomok wrote:
Wim Gielis wrote:
tomok wrote:I don't know if that also works for CELLGETN, highly doubt it, but you can always give it a try
It works fine. But it's undocumented by IBM.
http://users.skynet.be/fa436118/wim/tm1 ... dup_EN.htm
Interesting, but I imagine it would need to be a public subset and not a private one.
No, private subsets also work...

Re: How can i use subset in cellput/cellget function.

Posted: Sat Jan 14, 2017 2:19 pm
by tomok
Wim Gielis wrote:No, private subsets also work...
How would TM1 know where to get the private subset if the TI was kicked off by a chore? Those don't execute with a user ID.

Re: How can i use subset in cellput/cellget function.

Posted: Sat Jan 14, 2017 6:07 pm
by Wim Gielis
tomok wrote:
Wim Gielis wrote:No, private subsets also work...
How would TM1 know where to get the private subset if the TI was kicked off by a chore? Those don't execute with a user ID.
Hello Tom,

I did not run the process in a chore, but for myself, and the private subset was also one of myself.

If run in a chore, the result is an error message, the usual Invalid key error.
If run manually with a private subset for another user, same error.

Re: How can i use subset in cellput/cellget function.

Posted: Mon Jan 16, 2017 12:29 pm
by tcelkk
If the view you created in the prolog is the data source for the TI process then the TI will cycle through all the intersections for you in the Data tab and you don't have to use a CELLGETN as the data will already be in a variable for you. You just need to write a CELLPUTN to put it in the destination intersection. This is pretty basic TI stuff and is covered in the User Manual quite adequately.

Which variable? I didnt get.

This is my cube i created in prolog.
//PROLOG
vCube='Sample';
vViewSource='ViewSource';
vDim1='V1';
ViewCreate(vCube,vViewSource);
SubsetCreate(vDim1,vSub1);
SubsetElementInsert(vDim1,vSub1, V_source,1); //V_source is a paramater
ViewSubsetAssign(vCube,vViewSource,vDim1, vSub1);
ViewSubsetAssign(vCube,vViewSource,'Material', 'Material_Level_0');// this is an another subset i used it

vViewTarget='ViewTarget';
vDim2='V2';
ViewCreate(vCube,vViewTarget);
SubsetCreate(vDim2,vSub2);
SubsetElementInsert(vDim1,vSub1, V_target,1); //V_target is a also paramater
ViewSubsetAssign(vCube,vViewSource,'Material', 'Material_Level_0');

//DATA
For example
CellPutN(?,vCube ,V_target, '000', 'Currency',Material,'Element1','Measure_1');

I have a lot dimension in the cube i dont create subset all. Just writing in CELGETN.
How can i do this without CELGETN? I dont know. Maybe i use the wrong way..

Re: How can i use subset in cellput/cellget function.

Posted: Mon Jan 16, 2017 5:14 pm
by Steve Rowe
Hi,

You seem to be missing some really fundamental stuff such that we can't understand the question you are asking. The pieces of terminology you are using do not make any sense in the context you are using them.

You really need to spend some time on training or playing with some simple examples to get to the point where we can all speak the same technical language.

If you are trying to set a view to be a datasource of a TI and then reference that view in the data tab then you don't need to say anything special about the dimensions you are not assigning to the view. They will just show up as views in the datasource tab. You will need to point the TI at a dummy view (create via the right click export as ascii function) in order to get access to the datasource tab.

Suggest that you also try and talk more generally about what you are trying to achieve, rather than the single line of code you are struggling with.

HTH