lookupalldouble(
DATABASE
,
KEYFIELD
,
KEYDATA
,
DATAFIELDONE
,
DATAFIELDTWO
,
SEPARATOR
,
SUBSEPARATOR
)

The lookupalldouble( function is similar to the lookupall( function, but it returns two fields from the target database instead of just one.


Parameters

This function has seven parameters:

database – is the database that will be scanned. This database must be currently open. If this parameter is "" then the current database will be scanned. Note: The lookupalldouble( function will scan every record in the database, including records that are not currently selected. If you want to build an array from only selected records, use the arrayselectedbuild( function.

keyfield – is the name of the field that you want to search in. For example if you want to look up all checks written to a certain vendor, this should be the field that contains vendor names. The field must be in the database specified by the first parameter. (Note: For compatibility with older versions of Panorama, you are allowed to quote this parameter, however, quoting is not necessary.)

keydata – is the actual data that you want to search for. For example if you want to look up all checks written to a certain vendor, this should be the actual vendor name. This parameter is often a field in the current database, but it could also be a variable, a constant, or a general expression.

datafieldone – is the name of the field that you want to retrieve data from. For example if you want to retrieve check numbers, this should be the name of the field that contains check numbers. This must be a field in the database specified by the first parameter. Note: This function can optionally handle multiple data fields, with a separator, see below for further information.

datafieldtwo – the second field to retreive data from.

separator – is the main separator character for the text array you are building (see Text Arrays). This separator will be placed between each retrieved record.

subseparator – the secondary separator character. This separator will be placed between datafieldone and datafieldtwo.


Description

This function is similar to the lookupall( function, but it returns two fields from the target database instead of just one. This example will lookup all of the CIOs in the My Address Book database.

lookupalldouble("My Address Book","Title","CIO","First","Last",cr()," ")

Each name will be separated by a carriage return, with a space between the first and last names. The result will look something like this:

Julie Sanford
Brian Long
Paul Bradford
Maureen Herman
Eugene Lester
Andrew Winter

Note: This function is equivalent to:

arraymerge(
  lookupall(thedb,keyfield,keyvalue,datafieldone,mainsep),
  lookupall(thedb,keyfield,keyvalue,datafieldtwo,mainsep),mainsep,subsep)
)

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.