The Humble DRM Leaf Property

Q: What did the tree say to autumn?

A: Leaf me alone.

Now that I’ve got that out of my system, I thought we’d take a quick look at the humble DRM Leaf property. We’ve all used it one way or the other, whether we are setting up a hierarchy or applying formula logic. The Leaf property is a core system property which ships with DRM and signifies whether a node can have children below or not.

16_1_Leaf

One of the simplest reasons to use this property is to change a node from a leaf to a limb…of course, if it doesn’t have any children.

16_2_Boolean

Action Script?

What if we wanted to automate this change of property? This is possible by using the usual “ChangeProp” syntax. As the drop down list in the screenshot suggests, it is a simple Boolean property (did you know that George Boole had a crater on the moon named after him?). So the syntax to the script might look like:

16_3_AS

Running the above script will change the leaf to a limb node.

16_4_Limb

Import Action?

When you set up your hierarchies initially through imports, you might want to pay attention to the Node Options selection. Ignoring this is fine, if you have the ability to set a node as a leaf or not from your import table/file. If you want DRM to make the decision for you whether a node is a leaf or not, checking the following option would be a good idea.

16_5_Import

Some Blender Action?

When you are in situations when you have to blend a couple of versions, occasionally, a node might be a limb in the target version, but a leaf in the source version. Assuming the source version is accurate, how do we set a blender to work correctly? In the example below, “LC_CF” is a leaf in the source version, but a limb in the target.

16_6_Src_Trg

I think my blender would run correctly based on the setting below:

16_8_Blend

I run the blend, and no error messages are returned, so surely, all things must be good in Fandangoville?

16_9_Blend_Complete

Nope, a quick check on the hierarchy shows that nothing has changed; the node still remains as a limb.

16_10_Error_False

The fix though, is quite simple. And it comes back to our humble Leaf property. The trick is to add the Leaf property to the Properties section of the blender as shown below.

16_11_Blend_Leaf

And boom, all is good in Fandangoville again.

16_12_Leaf

What if there were children below the limb that was being changed as seen below?

16_13_Children

The blender will fail in this case and show an error.

16_14_Error_False

If we make the assumption that our source version is accurate, then the way around it is to ensure that the Process Removes option is checked.

16_15_Blend_Remove

And there you have it, the node becomes a leaf again and the child below it has been removed.

16_16_Complete

This may or may not work for you (specifically, removals), depending upon your implementation needs. So, make sure to test, test and test again. The whole point behind this post was to look at the humble Leaf property and how understanding it in different contexts shows how powerful it is.

Avatar

About Vijay Kurian

Known as the Clem Fandango of EPM consulting, Vijay Kurian has been developing enterprise solutions for companies for the last 12 years (increment years if reading post-2015). Having worked with Essbase, Planning, DRM and other assorted technologies during that time, he’s made the frankly, average decision, to write about them. He is, surprisingly, an Oracle ACE Associate. He hopes to contribute frequently to US Weekly, People and Sensible Chuckle magazines on improving reporting solutions, creating master data management systems and zzz…

Leave a Reply

Your email address will not be published. Required fields are marked *