Result.RecordsMatched

Note: Result fields are available with Integration, Message, and Request/Reply Flows.

Syntax

Result.RecordsMatched

Description

For this record, the number of records that matched the matching or lookup criteria from a previous block operation.

In general, the value of this field should be 0, no records matched, or 1, a single match was found.

Arguments

None

Returns

If Result.Success returns TRUE, then Result.RecordsMatched returns the number of matches from a previous Block operation. The possible results are 0, 1, or 2. A result of 2 indicates that more than one record was found.

Note: If more than 2 records are found, RecordsMatched still returns 2.

If Result.Success returns FALSE, the value of Result.RecordsMatched is unpredictable.

Example

The Result.RecordsMatched result field is often used in conjunction with a Lookup block and an If/Else Control block to determine if the value specified in the lookup exists.

For example, assume you have the following flow:

On the Lookup Criteria tab of the Lookup Account block, specify:

CustomerNumber equals account.accountnumber

Then use an If/Else block with the Result.RecordsMatched field to determine if a match was found indicating that the record exists., as follows:

where Customers is the target entity.

Related Topics

Result Fields

Result.Success