Setting Eltype

Post Reply
pmakulski
Posts: 60
Joined: Mon Jun 06, 2011 6:07 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2010

Setting Eltype

Post by pmakulski »

I have a process that deletes all of the children of a consolidation.
The consolidation point is still called a consolidation.
I can use an attributes dialog box to change it from Consolidated to Number

but I can't see how to do it in TI.

DTYPE tells me the type
DimensionElementInsert lets me specify NCS for a new item

But I can't see how to change C to N in an existing element.

(In the past I have deleted the element and readded it, but I don't want to do that here because at the higher levels I have ElementSecuity set and I don't want to lose it.)
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Setting Eltype

Post by lotsaram »

Sorry to say you can't "change" an element type. DType is a read only property. You can only change an element from N to C and vice versa by deleting and recreating it as you have been doing.

However I believe that if you were to delete and recreate within a single process you shouldn't lose any string data or attributes associated with the element as long as it was recreated with the same principal name.
Alan Kirk
Site Admin
Posts: 6647
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: Setting Eltype

Post by Alan Kirk »

lotsaram wrote:Sorry to say you can't "change" an element type. DType is a read only property. You can only change an element from N to C and vice versa by deleting and recreating it as you have been doing.
Actually you can go that way via using DimensionElementComponentAdd to add a child to an N level element, but unfortunately it's the vice versa way that Paul wants to go. I don't like it personally, but you can do it. See also this thread.

There's no way that I know of (other than delete/re-add) to do what Paul wants, though.
"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.
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Setting Eltype

Post by lotsaram »

Actually you can go that way via using DimensionElementComponentAdd to add a child to an N level element, but unfortunately it's the vice versa way that Paul wants to go. I don't like it personally, but you can do it. See also this thread.

There's no way that I know of (other than delete/re-add) to do what Paul wants, though.
Yes you can add a child to an N element to "convert" it to a C (either manually in the dimension editor or via DimensionElementComponentAdd in TI). I don't like this either, whether it is a bug or a "feature" who knows. But one thing I am pretty sure of is that behind the scenes what is happening is a deletion/creation, and to go from C to N as per the question asked there's certainly no other way.
User avatar
jim wood
Site Admin
Posts: 3958
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Setting Eltype

Post by jim wood »

Hhhhhmmm.... I agree that adding a child to an element changes to a C type element. (Kind of makes sense) But when I have done what Paul is doing they do not revert back to N level elements. They simply exist as consolidations without Children. Alan's point is correct.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Post Reply