PITransferRecordSearch Method (PITransferRecordDB object)

             

Searches the PITransferRecordDB for matching PITransferRecord objects. Returns a PITransferRecordList collection of results.

 

Syntax

object. PITransferRecordSearch varSearchStart, varSearchEnd, bstrSourceBatchIDMask, bstrSourceProductMask, bstrDestinationBatchIDMask, bstrDestinationProductMask, [pAsynchStatus], [varTransferRecordUniqueID], [varSourceUniqueID], [varDestinationUniqueID] 

The PITransferRecordSearch method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PITransferRecordDB object.

varSearchStart

A VARIANT containing the search start time. The VARIANT may be a PITime, DATE, String, or numeric. Interpretation of DATE, strings and numerics is consistent with PITime's interpretation. NOTE:  The minimum start time passed should be PITime.UTCSeconds = 1. 

varSearchEnd

A VARIANT containing the search end time. The VARIANT may be a PITime, DATE, String, or numeric. Interpretation of DATE, strings and numerics is consistent with PITime's interpretation.

bstrSourceBatchIDMask

BatchID mask to match with source PIBatch or PIUnitBatch.

bstrSourceProductMask

Product mask to match with source PIBatch or PIUnitBatch.

bstrDestinationBatchIDMask

BatchID mask to match with destination PIBatch or PIUnitBatch.

bstrDestinationProductMask

Product mask to match with destination PIBatch or PIUnitBatch.

pAsynchStatus

Optional asynchronous status object (PIAsyncStatus).

varTransferRecordUniqueID

Optional UniqueID of transfer record to search to return. Specifying this causes the search masks, Source UniqueID and Destination UniqueID to be ignored.

varSourceUniqueID

Optional UniqueID of source object. Specifying this causes the search masks to be ignored.

varDestinationUniqueID

Optional UniqueID of destination object. Specifying this causes the search masks to be ignored.

 

Remarks

PITransferRecord objects, like PIUnitBatch and PIBatch objects, are time series objects. The primary index is time. Therefore small time spans will result in faster calls.

 

The argument varTransferRecordUniqueID is used to retrieve a specific PITransferRecord object. This argument, if set, overrides the search masks including the start and end time. The search start and end time are used as a hint for where to find the object, but it is possible that the matching object may have start and/or end times outside of the time range of the search.

 

To get all the transfer records for a specific Source or Destination use the source UniqueID or destination UniqueID.

 

The pAsynchStatus argument is used for performing asynchronous calls. If this argument is passed, the method returns immediately with an empty list. This list is protected against access (an error of pseASYNCHMODEERR will be returned) until the call is complete.

 

If no PITransferRecord's are found that match the search criteria, an empty list is returned.

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseNOGENSERVER

The underlying server abstraction layer could not be accessed.

 

 

Enabling Operational Intelligence