cancel
Showing results for 
Search instead for 
Did you mean: 

Validation to find the Root Node !!!!

Former Member
0 Kudos

Hi All,

Is it possible to write a Validation to find the Root Node of the Hierarchy,

For E.g. If we have a three level hierarchy

Printer

Dot Matrix

T123

So is there a way I can check if my Root node value is Printer or not, because in Data Manager the value that is selected from the hierarchy drop down is the leaf node.

Regards,

Parul

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Parul,

Kindly update us on your issue which may be useful for someone looking for similar requirement.

Regads,

Jitesh Talreja

Former Member
0 Kudos

Hi Parul,

If your hierarchy is like

Printer

- Dot Matrix

- Laser

--Laser1

--Laser2

then using *Hierarchy..Name* expression will return the parent of selected child i.e. when your record contains Laser2 then the expression will return Laser, for Dot Matrix you will get Printer as an output. You can first check this output by creating an assignment on any text field and then go for validations. For Validation use Hierarchy.. instead of Hierarchy..Name and dont write any thing manually.

Note: Hierarchy is the hierarchy table name and Name is the field present in hierarchy table.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

The solution is as follows:

MDM does not give us the option to traverse to the grandparent of the leaf node..

In the example that we have taken :

Printer

- Dot Matrix

- Laser

--Laser1

--Laser2

Here if we want to check if the Grandparent of Laser1 is Printer, this cannot be done using the simple Validation, because through validation also we can at max find the parent of the current node i.e. we can traverse till Laser (for Laser 1 leaf node).

Further we cannot use Laser as the node because in MDM we have to traverse completely through the last node and select it in Data Manager. So again we cannot search for Laser -> Parent.

The Work Around that I have used is :

I have created a new field and every time I import data I have mapped this field with the first Level Node and have put the Validation on this field.

Eg: The field name is Root Node, so everytime the data is imported, Level 1 is mapped to Root Node and so all the Root node values are imported in the Root Node field that we have created and everytime the Validation Runs on this Root Node field and accordingly the process follows.

Hope that would be helpful to you all!!!!

Regards,

Parul Malhotra

Former Member
0 Kudos

Parul,

Try this ... assume Hierarchy Name is "Interface".

Interface.[Parent].Interface Name = "Printer"

Here Interface ==> Hierarchy table name

Interface Name ==> hierarchy Node name.

let me know if this works out for you.

thanks

Alexander

Former Member
0 Kudos

Hi Alexander,

Thanx for a quick reply.. But we still have a problem here

Interface.Parent.Interface Name = "Printer"

The bottom most node is the leaf node and hence

Interface => Leaf Node => T123

Now if I search for the Parent of Interface that would be my middle node and the name would return "Dot Matrix" and not Printer.

I have already tried selecting the path

"Hierarchy . Root Node " but this does not return Printer, however the validation doesn`t fail, but it returns a blank value.

Regards,

Parul