cancel
Showing results for 
Search instead for 
Did you mean: 

Reading and modifying data in a recursive node

Former Member
0 Kudos

Hi All,

I am using a TreeByNesting column in a table UI element of my component.

For this purpose I have created a node in the context - ('TREE') which contains a recursive node - ('RECURSIVE_TREE').

What would be the simplest way to read the data from this node ? And how do I go about changing a single line of information

within the node ?

Thanks,

Fathima

Accepted Solutions (1)

Accepted Solutions (1)

ChrisPaine
Active Contributor
0 Kudos

What would be the simplest way to read the data from this node?

Reading data from a recursive node is no different to reading any normal node. It's just that you have a very simple way of holding the same structure.

Once you have a reference to the element of a node (a single line of data), then updating it is no different to updating a line of a table.

More issues are associated with making and setting lead selections for an element (all parent elements also need to be lead selected and no child elements). Searching through the hierarchy, etc.

Where I have used this functionality I have often set up search tables with the key data that I want to search in a flat table and a reference to the corresponding element - much easier to search then - without having to resort to recursive coding!

Could you elaborate a little on what exactly you are having an issue with?

Cheers,

Chris

Former Member
0 Kudos

For one, the node that I have implemented might have up to a maximum of 5 sub-node levels.

So the user may open the tree at different levels and I want to see all the expanded nodes in an internal table.

I just tried a simple 'get_child_node ' implementation , but I find that if 2 or more nodes are expanded, on the same sub-node level, only one of them is read.

I have also tried using the 'get_child_nodes' method.

How do I extract a single node from the list of child nodes ? Particularly when they are of different data types.

Is there a way to sort of go through the entire tree, line by line and read the info ?

" Where I have used this functionality I have often set up search tables with the key data that I want to search in a flat table and a reference to the corresponding element - much easier to search then - without having to resort to recursive coding! "

This sounds like a really good option. I think I should try to implement something like this. It would make the reading the data part much easier.

Answers (0)