Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Maybe I am missing something but I did not find the solution and need help.
My table DATA have the property : one child have only one parent. One parent can have several children.
I am using function Hierarchy like below :
Hierarchy( id, parentid, node,,node,TreeView) Load
id, parentid, node
Resident DATA;
The result I have on 'TreeView' is currently :
Root
Root/
Root//
Root///
Root////
Root/////
Root//////
Root///////
and I expected :
Root
Root/123
Root/123/95548
......
Many thanks in advance for your help
Regards
Gilles
I found three problems:
1) The data model is not good. See picture. The field "node" should exist in only one table.
2) You should have the root nodes as records of their own in the input to the Hierarchy prefix. The parent of a root should be NULL.
3) For some reason, the path is not generated correctly if the node names are numeric. This could be a bug and this is what causes your problem. But the work-around is simple: Use the Text() function for the node names.
In the attachment you can see that it works if you make these changes.
HIC
I need to see your data to figure out where the problem is. My example (see attachment) works fine.
HIC
Hello Henric,
please find in attachment my application (restricted data, deleted connection).
I noticed that then I use an infile it is working but I need to call the table directly from the database.
Many thanks in advance for your help,
Regards,
Gilles
I found three problems:
1) The data model is not good. See picture. The field "node" should exist in only one table.
2) You should have the root nodes as records of their own in the input to the Hierarchy prefix. The parent of a root should be NULL.
3) For some reason, the path is not generated correctly if the node names are numeric. This could be a bug and this is what causes your problem. But the work-around is simple: Use the Text() function for the node names.
In the attachment you can see that it works if you make these changes.
HIC
Thank you very much for the explanations.
It is working now
Regards,
Gilles