
Lookup field methods:
---------------------

The DataObject method getLookupFieldOptions() can be used to get all of the
possible options for a particular lookup field.

The Connection class also has a getLookupFieldOptions method that takes a
classname as an additional argument. This allows a client to get a list of
options for display without needing to create a temporary/dummy object.

The return value of both methods is an array of 'LookupOption' structures.
Each LookupOption instance contains a member called 'value' that gives the
string that would be placed in the lookup field. It also contains
information on what control fields need to be set to what value.

The DataObject method setLookupField() in turn can be used to automatically
set the appropriate control fields to alter the contents of the lookup field.

The simplest technique would be to use getLookupFieldOptions() to locate all
valid options, select a particular option, and then use setLookupField() to
set that option.

Example (in python):

    opts = obj.getLookupFieldOptions( "fieldname" )
    for o in opts: print o.value
    selected_index = ... select item by index ...
    obj.setLookupField( opts[selected_index] )

