Highlighted
Absent Member.
Absent Member.
673 views

[archive] Treeview navigation

[Migrated content. Thread originally posted on 21 October 2005]

I have a tree view something like this where ORDER is the ROOT.

+ ORDER #116807
|
+ 10 I WIRE COIL #37
|
+ 20 I 3/8" CONDUIT 500 FT.
|
- 30 I 1" CONDUIT 500 FT.
| |
| |----35 DO NOT HOLD UP ORDER IF NOT IN STOCK
| |----40 SHIP THIS ITEM SEPARATE IF NECESSARY TO:
| |----45 PROJECT 61 STORAGE FACILITY
|
+50 I #4A7B JUNCTION BOXES

The objective is to select line 30 and follow the children to the
last child of line 30 to determine that line number.

Having found line 30 with index in item-1 and using

INQUIRE TREE(ITEM-1) ITEM-TEXT IN TREE-DATA

I have the correct text in TREE-DATA. Using

MODIFY TREE NEXT-ITEM TVNI-CHILD GIVING ITEM-1

gives the correct index to line 35. But subsequent execution of

MODIFY TREE NEXT-ITEM TVNI-CHILD GIVING ITEM-1

keeps returning the same line 35 index. So the question:

Are lines 40 and 45 children of line 30 or siblings of line 35?

Does anyone know the correct syntax to accomplish this?

Regards

Vins Nash
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Treeview navigation

I think that these items are both, they are children of the parent and siblings. When modifying the tree have you considered this type of syntax:

modify tree,
parent = save-ev-2
item-to-add = out-data (data in 40 or 45)

Also, I have found that using the hidden-data property for each item in a tree makes it easier to find and modify.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Treeview navigation

Originally posted by vinsnash
MODIFY TREE NEXT-ITEM TVNI-CHILD GIVING ITEM-1

keeps returning the same line 35 index. So the question:

Are lines 40 and 45 children of line 30 or siblings of line 35?

Does anyone know the correct syntax to accomplish this?



Once you have found the first child then use TVNI-NEXT will give you the next child so the code is:

MODIFY TREE NEXT-ITEM TVNI-NEXT GIVING ITEM-1

Try this.
Shaylesh
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Treeview navigation

Thank you.

Not ever having more than one child myself, I forgot about "sibblings".

Vins Nash:o
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.