GetItemsEx

This method loads a set of macros to be evaluated from the Transaction Management tables. Specify a SQL statement that will retrieve the desired recordset and take advantage of the complexity allowed by ODBC. Knowledge of the table and field names is required.

Group:  Transaction Management

Syntax:  [bOK = ] TM.GetItemsEx(sSQL, oTran)

bOK     (Boolean) Optional – True or False for the success of the command

sSQL    (String) specifies the SQL statement for retrieving a list of macros

oTran    (DataRecord) the variable declared as a DataRecord that contains the list of macros and their data. For more information on how the DataRecord object is used see the DataRecord section of the manual.

The table names required depend on the name of the queue configured in the Transaction Management setup. For the RFQueue the tables created are:

RFQueue – used to store the InProcess items
RFQueue_Completed – used to store successfully completed items
RFQueue_Failed – used to store failed transaction macros

Substitute the RFQueue name for alternate queues that may have been defined. The fields that can / should be referenced through SQL within the tables are shown below.

RFQueue table:

Field Name     Data Type     Description

SeqNo            Number          the sequence number
TranDate         Number          when the macro was queued (20151231)
TranTime         Number          when the macro was queued (235959)
Source            Text               linked source for the macro if it exists
Name              Text               name of the macro
Record            Text               contains the passed values to the macro
FormId            Text               form that queued the macro
UserId             Text               user that queued the macro
DeviceNo        Number          device number assigned to the client
IPAddress       Text               IP address of the client device
DevGuid          Text               assigned GUID of the client device
ExecDate        Number          date the macro executed (20151231)
ExecTime        Number          time the macro executed (235959)
Status             Number          integer status of the macro

The RFQueue_Completed table and RFQueue_Failed table have the same design as RFQueue.

Example:

Dim oList As DataRecord

TM.GetItemsEx("Select * from RFQueue where UserId = 'SAM'", oList)