Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms tree items.... 1

Status
Not open for further replies.

lewisp

Programmer
Aug 5, 2001
1,238
GB
Can I ask for some assistance please? We're currently running Forms 6i on the client, version 6.0.8.12.1 (patch 3a). I have a problem in that the tree search function performs a LIKE comparison rather than =. Can someone with a higher version of patch 3a please try the following test case. The idea is that you type in the exact value you are looking for in the tree into the search text box, then press the search button. In our case, the MB5 row is highlighted even if we type MB into the search box. We have tested Forms 9i and it works as expected by highlighting the MB row. I need to confirm I have this right as we cannot upgrade all out 1000+ PCs to a later version at present.

Test case:

[tt]1) Create a blank form.
2) Add a new block, call it B.
3) Add a tree item to the block, call it T.
4) Add another block to the form, call it C.
5) Add a text item to the C block, call it I.
6) Add a push button to the C block.
7) In WHEN-NEW-FORM-INSTANCE-TRIGGER, place following code:

DECLARE
l_node ftree.node;
BEGIN
l_node := Ftree.Add_Tree_Node('B.T',
Ftree.ROOT_NODE,
Ftree.PARENT_OFFSET,
Ftree.LAST_CHILD,
Ftree.EXPANDED_NODE,
'M',
NULL,
'M');
l_node := Ftree.Add_Tree_Node('B.T',
l_node,
Ftree.PARENT_OFFSET,
1,
Ftree.LEAF_NODE,
'MAZ',
NULL,
'MAZ');
l_node := Ftree.Add_Tree_Node('B.T',
l_node,
Ftree.SIBLING_OFFSET,
ftree.NEXT_NODE,
Ftree.LEAF_NODE,
'MB5',
NULL,
'MB5');
l_node := Ftree.Add_Tree_Node('B.T',
l_node,
Ftree.SIBLING_OFFSET,
ftree.NEXT_NODE,
Ftree.LEAF_NODE,
'MXXP',
NULL,
'MXXP');
l_node := Ftree.Add_Tree_Node('B.T',
l_node,
Ftree.SIBLING_OFFSET,
ftree.NEXT_NODE,
Ftree.LEAF_NODE,
'MB',
NULL,
'MB');
END;


8) In WHEN-BUTTON-PRESSED trigger on button, place the following code:

DECLARE
l_node ftree.node;
BEGIN
l_node := Ftree.Find_Tree_Node('B.T',
:c.i,
Ftree.FIND_NEXT,
Ftree.NODE_VALUE,
Ftree.ROOT_NODE,
Ftree.ROOT_NODE);
--
IF NOT ftree.id_null(l_node)
THEN
ftree.set_tree_selection('B.T',
l_node,
Ftree.SELECT_ON);
END IF;
END;

9) Run the form, enter MB into text item and press the button. Forms 6i (patch3a) will highlight the MB5 branch.
[/tt]

TIA much.
 
It works correctly on 6.0.8.19.2 (selects MB).

Regards, Dima
 
Thanks Dima. 6.0.8.19.2 is patch 10 I take it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top