Page 1 of 1
static subsets saved disappears
Posted: Wed Nov 01, 2017 5:27 pm
by Analytics123
Hi ,
We have static subsets disappearing in few dimension . we are not deleting any elements , while the dimension is updated we just unwind the dimension elements and re add the elements.
Also I could see the subset data in the data folder but opening up the editor showing blank for subsets.
Is this a bug in tm1 10.1.1 , we have no clue why the elements would be blank .
Thanks
Re: static subsets saved disappears
Posted: Wed Nov 01, 2017 10:49 pm
by tomok
What you are seeing is what happens when you delete elements and add them back in a TI process. You're probably not "unwinding" them like you say you are. If you are unwinding, why would you need to add them back? You just re-establish parent-child relationships.
Re: static subsets saved disappears
Posted: Thu Nov 02, 2017 12:38 am
by Wim Gielis
Analytics123 wrote: ↑Wed Nov 01, 2017 5:27 pm
We have static subsets disappearing in few dimension .
Please try to be clear. Your subsets aren’t disappearing it’s the elements within the subsets that disappear.
Re: static subsets saved disappears
Posted: Thu Nov 02, 2017 9:54 am
by Steve Rowe
As well as the delete mentioned by Tom you can see issues in this space if you delete and recreate an alias that is being used by the subset
Re: static subsets saved disappears
Posted: Thu Nov 02, 2017 12:25 pm
by Analytics123
yes elements with in subsets are disappearing . we are not deleting the element any where .
Re: static subsets saved disappears
Posted: Thu Nov 02, 2017 12:27 pm
by Analytics123
dim update customers
first unwinding code :
DIMENSIONSORTORDER(vDim,'','','ByHierarchy','ASCENDING');
vMax = DIMSIZ(vDim);
vCount = 1;
WHILE (vCount <= vMax);
vElem = DIMNM(vDim, vCount);
vMaxParents = ELPARN(vDim, vElem);
WHILE (vMaxParents>0);
vParent = ELPAR(vDim, vElem, vMaxParents);
DimensionElementComponentDelete(vDim, vParent, vElem);
vMaxParents = vMaxParents - 1;
END;
vCount = vCount + 1;
END;
Then updating parent child relation from load file .
# Customers SoldTo
DIMENSIONELEMENTINSERT('Customers SoldTo','','All Regions','c');
DIMENSIONELEMENTINSERT('Customers SoldTo','','All Countries','c');
DIMENSIONELEMENTINSERT('Customers SoldTo','','z_Orphans','c');
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo','All Regions', 'z_Orphans',1.000000);
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo','All Regions',SoldToRegion,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo',SoldToRegion,SoldToDist,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo',SoldToDist,vSoldToSubRegion,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo',vSoldToSubRegion,SoldToRep,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo',SoldToRep,SoldToCustomer,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo',SoldToCustomer,ShipToCustomer,1.000000);
Thats the code we have .
Re: static subsets saved disappears
Posted: Thu Nov 02, 2017 3:30 pm
by lotsaram
Analytics123 wrote: ↑Thu Nov 02, 2017 12:27 pm
Thats the code we have .
Are you sure? Like really, REALLY sure? Because if elements are being removed from a static subset (which isn't being edited in any way), then the only way that is happening is if the elements are being deleted and then re-added to the dimension. Have you double (and triple) checked that there isn't any other process also editing the same dimension?
Also much better practice to loop backwards from max to 0 whenever removing items from a list.