Previous Topic

Next Topic

Inhoudsopgave

Book Index

Lookup Function

Function Function Lookup####( FormNumber, FieldName, FieldValue )

Description

A look-up script must comply with certain naming rules. Because every look-up is identified by the form to which the lookup refers, the naming rules have been adapted accordingly. For a lookup to a specific form, the corresponding look-up script will be defined as follows. The #### represents the number of the form code (including leading zeros) that would normally be opened by the default Isah look-up.

Parameters

Example Of A Look-up Script

The following script shows an example of the use of look-up scripts.

Rem# I0047

function Lookup0040( FormNumber, FieldName, FieldValue )

Dim aLookupObj

set aLookupObj = new TSimpleLookup

aLookupObj.SQL = "Select part number,description from t_part"

aLookupObj.Title = "Select a part"

aLookupObj.ResultField = "part number"

aLookupObj.LocateValue = FieldValue

rem DefaultValue is FieldValue

Lookup0040 = FieldValue

if aLookupObj.Lookup then

Lookup0040 = aLookupObj.ResultValue

End If

set aLookupObj = nothing

end function