Page 1 of 1

REST API: DimensionElementComponentAdd

Posted: Mon Mar 11, 2019 5:47 pm
by Dimix
Hi

I'm using the REST API to create a dimension hierarchy.

I'm using below syntax to connect an element to a consolidated node, which works as expected.

Body: {"Element":{"Name": "New Element", "UniqueName":"[plan_business_unit].[New Element]"}}
POST: Dimensions('plan_business_unit')/Hierarchies('plan_business_unit')/Elements('Consolidation1')/tm1.SetComponent

My issue is if I want to add the same element to a second consolidated node, i.e.:

Body: {"Element":{"Name": "New Element", "UniqueName":"[plan_business_unit].[New Element]"}}
POST: Dimensions('plan_business_unit')/Hierarchies('plan_business_unit')/Elements('Consolidation2')/tm1.SetComponent

I'm getting this error message:

Capture.PNG
Capture.PNG (4.93 KiB) Viewed 2305 times

How can I connect an element to more than one node?

Re: REST API: DimensionElementComponentAdd

Posted: Mon Mar 11, 2019 6:47 pm
by Dimix
Found the answer:

Body: {"Element@odata.bind": "Dimensions('plan_business_unit')/Hierarchies('plan_business_unit')/Elements('New Element')}​​
POST: Dimensions('plan_business_unit')/Hierarchies('plan_business_unit')/Elements('Consolidation2')/tm1.SetComponent

Found it here:
https://www.ibm.com/developerworks/comm ... operations