DonValFor()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

DonValFor()

Syntax

DonValFor( <Condition>, <FieldExpr> )

 

Purpose

To retrieve the value of a donation field or field expression for a specific donation in a given donor's history.

 

Parameters

<Condition> is any expression which evaluates to true or false. This expression is used to tell DonValFor() which donation you wish to retrieve a value for. The condition should be very specific so that DonValFor() can pinpoint the exact donation you are interested in. For example, <Condition> could be used to select a donation containing a certain comment in the donation comment field, or perhaps a donation made within a specific date range.

 

<FieldExpr> is the donation field or field expression you wish DonValFor() to return the value of for the specific donation identified via the <Condition> parameter.

 

Returns

DonValFor() will return the value of a donation field or field expression for a specific donation in a given donor's history. The type of data value returned by DonValFor() will be the same as <FieldExpr>.

 

Usage

DonValFor() can be used to "reach in" to a donor's donation history to retrieve information from a specific donation. For example, to create a report with a column containing the comment of the most recent donation for each donor, you could use the following DonValFor() expression:

 

Example

DonValFor( .Donation_Number. = .#_Donations., .Donation_Amount )