Page 1 of 1
Parameter variable wont insert element
Posted: Tue Jul 27, 2010 12:44 pm
by Gary16
Hi
I have a process which copies from the latest forecast version to a named forecast version.
It wont recognise the parameter for my named version "Targetversion".
In my subset element insert statement, it saying the element does not exist, i have moved the
DimensionElementComponentAdd('Version', 'Static Versions', Targetversion, 1); in front of the subset element insert statement, and tried to set some variables relating to Targetversion, but it still wont work.
My process is copying the latest forecast to the targetversion and clearing the data in the targetversion view each time it runs.
So im creating 2 views 1 for the latest forecast and 1 for zero out of the targetversion.
Thanks
Re: Parameter variable wont insert element
Posted: Tue Jul 27, 2010 4:04 pm
by kielmc
In my subset element insert statement, it saying the element does not exist, i have moved the
DimensionElementComponentAdd('Version', 'Static Versions', Targetversion, 1); in front of the subset element insert statement, and tried to set some variables relating to Targetversion, but it still wont work.
Try putting the DimensionElementComponentAdd function in the metadata tab and the SubsetElementInsert function in the data tab.
Re: Parameter variable wont insert element
Posted: Wed Jul 28, 2010 3:20 am
by LoadzaGrunt
Are you creating TargetVersion in the Prolog ? If so, you probably should create TargetVersion first in a separate process, before trying to include it in a subset in your version copy process.
Re: Parameter variable wont insert element
Posted: Wed Jul 28, 2010 1:22 pm
by Gary16
Hi
I ended up having to create and process to add the element, targetversion.
The process used to copy data from latest forecast to targetversion and the targetversion was added ok, Into the version hierarchy.
I had to add some more code to zero the view which had the targetversion in it.
The process fails when targetversion is inserted in the SubsetElementInsert function, which comes after the DimensionElementComponentAdd.
I have tried setting targetversion as variable like below.
new_targetversion=targetversion;
But again it fails at the SubsetElementInsert function line saying the element does exist.
targetversion is parameter selected by the user.
Can this parameter only be used once the prolog tab, I have also added it as a variable multiple times.
Also I have moved the code into the different tabs, of Turbo Intergrator but it still fails at SubsetElementInsert function for targetversion.
Thanks for your help
Re: Parameter variable wont insert element
Posted: Wed Jul 28, 2010 1:52 pm
by lotsaram
Gary,
What you are trying to do is certainly possible. You just need to remember that the element which has just been inserted doesn't actually exist until the dimension is compiled. (You would get a similar error if you tried to store an attribute value against your newly created element.) Dimension compilation happens at the completion of the prolog tab and metadata tab. If you do the inserting of the element on the prolog and edit the subset on the epilog then you should have no problem. See the attached very simple process.
Re: Parameter variable wont insert element
Posted: Wed Jul 28, 2010 3:02 pm
by Gary16
Hi
The process follows this pattern
1.creates views for latest forecast, or what ever version selected. prolog tab
2. deletes all data in targetversion. prolog tab
3. adds all data to targetversion. data tab
4. destroys view and subset epilog tab.
I have tried your method and put the view zero in epilog and add data to targetversion in epilog it still wont work
Re: Parameter variable wont insert element
Posted: Sun Mar 06, 2011 6:27 pm
by Delbrooks
Put subsetElementInsert in data tab. It will work. In case data tab is disabled for you, point to a dummy TM1 cube view and it will work. This is good for 9.4.1 and 9.5 onwards.