In this series of posts, we will look at how DRM allows us to associate nodes as property values.
As an example, think of those scenarios where we might need an attribute dimension for Essbase. We could set that up as a list property with DRM, if the following conditions hold true (at least in my opinion):
- The property isn’t frequently updated.
- The dimension need not be more than 1 level deep.
If we need to automate the update of that list, we would need to use custom code which could be time-consuming to set up. Further, if it ever turns out that the attribute dimension needs to have more levels, then we would have to create another property to provide the additional summary points. To avoid painting ourselves into a corner, it’s a good practice to create a hierarchy and use the nodes within it as property values using some of the different node-related data types that DRM ships with, such as (focusing only on the commonly used ones here):
-
Associated Node/Nodes
-
Global Node
-
Leaf/Limb Node
- Node
The Setup
First off, let’s look at how we define these properties. From the property definition tab, we can make these selections from the Data Type dropdown list.
Notice that the Constraints tab has been activated. This is a neat little feature that popped up a couple of versions ago which allows us to narrow down the hierarchies that the user needs to select from, when making a node association.
To illustrate, even though I have additional hierarchies in my version, the property selection window narrows down the selectable hierarchies to the constraint I’ve selected.
To show how these data types might work in real life, I’ve set up 4 properties.
In this post, though, we will look at the first two, the Associated Node and the Associated Nodes data type. Though the names are similar, there are subtle differences between the two.
Associated Node
To see how this data type behaves, I’ve made a selection of “UK” for the “Matt Berry” node below.
If we toggle to the Countries hierarchy, we can see that the “UK” node automatically has the value “Matt Berry” selected.
So, the Associated Node data type, gives us a 2-way association. What if I give the “UK” association to another node?
We see that our earlier association has been replaced with the value, ”Matthew Holness”!
Not what we intended to do. So, be careful when you use this data type. Unless you are sure that your node associations are unique, you could run into issues when using it.
Associated Nodes
This data type allows us to associate multiple nodes as property values. Case in point, in the example below, I am selecting “US” and “UK” nodes for the “Matt Berry” node:
If we now look at the Countries hierarchy, both “UK” and “US” nodes show “Matt Berry” as associated values:
And what if we attach the “UK” node to another node within the shows hierarchy?
The “UK” node has retained both associations from the shows hierarchy as comma-separated values. The “US” node too, still retains the “Matt Berry” association as well. As, we can see, the “replacement” behavior we saw for the associated node data type does not get repeated, making the Associated Nodes data type, more forgiving. We will continue on this topic on the next series of posts. Until, then, Merry Christmas.