IDLookUp()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

IDLookUp()

Syntax

IDLookUp( <IDNumber>, <FieldExpr> )

 

Purpose

To return field information from the record of a related donor during a report.

 

Parameters

<IDNumber> is the ID number of the related donor. This number is usually taken from one of the linkage fields of the current donor during a report. Linkage fields are fields such as the related donor and matching donor ID fields.

 

<FieldExpr> is usually the name of a single field, but it could also be a field expression consisting of a combination of two or more fields. The <FieldExpr> refers to the information you wish to get from a donor account somehow related to the current donor during the printing of a report.

 

Returns

Returns the value given by <FieldExpr>.

 

Usage

A donor can be related to other donors in many ways. For example, there is a field called .Matching_Gift_Donor. which, for each donor, stores the ID number of another donor who has promised to make matching gifts.

 

You may wish to create a report which describes how each donor is related to other donors. In such a report, you often need to temporarily reach into the "other donor's" record to get information.

 

Example

The following example shows how you could retrieve the last name of the matching gift donor, using the IDLookUp() function along with the .Matching_Gift_Donor. field:

 

IDLookUp( .Matching_Gift_Donor., .Last_Name. )