List - FindReference Method

Find an object stored as a RelatedReference

Member of List (PRIM_LIST)

Parameters

NameTypeData TypeDescription
Result*Result (Optional)PRIM_LIST.ListItemReference to the first with a matching RelatedReference
RelatedReference*InputPRIM_OBJTObject instance to search for
StartItem*Input (Optional)PRIM_LIST.ListItemItem at which to start the search

Details

The FindReference method searches for the object specified in the RelatedReference parameter in the RelatedReference property of the List items.
 
FindReference 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_List.ListItem) Name(#FoundItem) Reference(*Dynamic)
 
      Begin_Loop
 
         #FoundItem <= #List.FindReference( #Object #FoundItem )
         Leave If(#FoundItem *Is *Null)
 
         #FoundItem.Style <= #MyStyles<Highlight>
 
      End_Loop
 
Endroutine

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2