
Search for an object stored in the item RelatedReference property
Member of Tree View (PRIM_TRVW)
Parameters
Name | Type | Data Type | Description |
---|---|---|---|
Result | *Result (Optional) | PRIM_TVIT | Resulting item |
RelatedReference | *Input | PRIM_OBJT | Object to be searched for |
StartItem | *Input (Optional) | PRIM_TVIT | Item at which to start searching |
Details
The FindItem method searches for the object specified in the RelatedReference parameter in the RelatedReference property of the tree items. FindItem processing will stop when an item is returned or no item is found.
Example
In this example the found items are given a style to highlight them.
Mthroutine Name(Find) Define_Map For(*Input) Class(#Prim_objt) Name(#Object) Pass(*By_Reference) Define_Com Class(#prim_tvit) Name(#FoundItem) Reference(*Dynamic) Begin_Loop #FoundItem <= #Tree.FindItem( #Object #FoundItem ) Leave If(#FoundItem *Is *Null) #FoundItem.Style <= #MyStyles<Highlight> End_Loop Endroutine
See also
LANSA Version 15, April 2020