Page 1 of 1
Data to send using Attibutes
Posted: Wed Mar 12, 2014 10:00 am
by Pierre06
Hi,
I want to allocate costs on 4 different lines (leaf elements with no rules attached) based on the attribute ('Service Type') of an 'Element' using a TI process.
The attribute data are 'X' or 'Y' or blank.
My 4 different lines are 'R&D X', 'R&D Y', 'ACC X' and 'ACC Y'.
My final command to send the costs is working (I tested to send data directly in 'R&D X' element and it worked) but not when I replace the leaf element by V9 (see hereafter for command).
IF(ATTRS('2_DimName','Element','Service Type')@='');
Itemskip;
ELSEIF(ELISANC('2_Cost_Center','[R&D]','Cost_center') = 1);
V9 = 'R&D '|CellGetS('2_DimName','Element','Service Type');
V9 = 'ACC '|CellGetS('2_DimName','Element','Service Type');
ENDIF;
Do you have any idea ?
Thanks.
Re: Data to send using Attibutes
Posted: Wed Mar 12, 2014 10:34 am
by EvgenyT
My final command to send the costs is working (I tested to send data directly in 'R&D X' element and it worked) but not when I replace the leaf element by V9 (see hereafter for command).
IF(ATTRS('2_DimName','Element','Service Type')@='');
Itemskip;
ELSEIF(ELISANC('2_Cost_Center','[R&D]','Cost_center') = 1);
V9 = 'R&D '|CellGetS('2_DimName','Element','Service Type');
V9 = 'ACC '|CellGetS('2_DimName','Element','Service Type');
ENDIF;
Ok, where is the send part of the TI? Also, V9 will only get Service Type string for 'ACC '|CellGetS('2_DimName','Element','Service Type')' based on your declaration above.. I suspect it should be
V9 = 'Element '|CellGetS('2_DimName','Element','Service Type') ?
ET
Re: Data to send using Attibutes
Posted: Wed Mar 12, 2014 10:48 am
by Pierre06
Hi Evgeny,
hereafter is the send part of the TI:
CellIncrementN(vData, 'OUTPUT_Cube', 'Euro', 'Actuals', 'Jan-14', V9, 'Product_Name', 'Value');
Also, V9 will only get Service Type string for 'ACC '|CellGetS('2_DimName','Element','Service Type')' based on your declaration above.. I suspect it should be
V9 = 'Element '|CellGetS('2_DimName','Element','Service Type') ?
In fact I want to send the data on my 4 elements that are a concatenation of 'R&D' or 'ACC' and the attribute.
Re: Data to send using Attibutes
Posted: Wed Mar 12, 2014 10:58 am
by EvgenyT
In fact I want to send the data on my 4 elements that are a concatenation of 'R&D' or 'ACC' and the attribute.
Well you are not going to achieve it by declaring v9 to 'ACC' only
Re: Data to send using Attibutes
Posted: Wed Mar 12, 2014 11:29 am
by Pierre06
but I thought that by writting 'ACC '|CellGetS('2_DimName','Element','Service Type') it will concatenate 'ACC ' and the attribute.
Am I wrong ?
Re: Data to send using Attibutes
Posted: Wed Mar 12, 2014 11:30 am
by paulsimon
Hi
I think the key problem is that you have 'Element'. Surely Element is a variable so it should be just Element with no quotes?
Regards
Paul Simon
Re: Data to send using Attibutes
Posted: Wed Mar 12, 2014 11:40 am
by Pierre06
Hi Paul,
you are right. There should not be quote, I wrongly put them when writting this post but in the formula I am using there are none.
IF(ATTRS('2_DimName',Element,'Service Type')@='');
Itemskip;
ELSEIF(ELISANC('2_Cost_Center','[R&D]','Cost_center') = 1);
V9 = 'R&D '|CellGetS('2_DimName',Element,'Service Type');
V9 = 'ACC '|CellGetS('2_DimName',Element,'Service Type');
ENDIF;
Still it doesn't work.
Re: Data to send using Attibutes
Posted: Wed Mar 12, 2014 12:15 pm
by EvgenyT
Are you saying data not being posted to ACC, R&D or both?
Bases on your code it will only be posted to ACC if it meets ELISANC condition above, if you want to post to different lines you should be declaring V9 = Element | CellGets....
Thanks
Re: Data to send using Attibutes
Posted: Wed Mar 12, 2014 12:57 pm
by Pierre06
Data are not posted on both.
I want to say: if R&D is the ancestor of the cost center then V9 is the concatenation of R&D and the attribute of Element. If not then V9 is the concatenation of ACC and the attribute of Element.
Is my command wrongly written ?
Re: Data to send using Attibutes
Posted: Wed Mar 12, 2014 1:24 pm
by tomok
Pierre06 wrote:Data are not posted on both.
I want to say: if R&D is the ancestor of the cost center then V9 is the concatenation of R&D and the attribute of Element. If not then V9 is the concatenation of ACC and the attribute of Element.
Is my command wrongly written ?
Yes. Don't you think you may need another ELSE in there between the two V9 assignments?????
Re: Data to send using Attibutes
Posted: Wed Mar 12, 2014 1:40 pm
by Pierre06
Yes Tomok, you are right. It works now.
Thanks to all for your help.