Added GET
, to change code like this:
CLEAR(ORD:Record)
ORD:CustNumber = 4
ORD:OrderNumber = 3
GET(Orders,ORD:KeyCustOrderNumber)
IF NOT ERRORCODE()
!Some code
.
To:
IF tm.GET(ORD:KeyCustOrderNumber,4,3) !1 to 10 key components
!Some code
.
Or, if you have the values in a group:
IF tm.GET(ORD:KeyCustOrderNumber,DTL:CustOrderNumbers)
!Some code
.
For queues, you can pass the label of the queue, then the label of each of the key fields, and then the values for each field.
IF tm.GET(myQ,myQ.Field1,myQ.Field2,Value1,Value2) !1 to 8 field/value pairs
!Some code
.
By default the buffer is cleared before assigning the values and calling GET
, but it can be disabled by calling tm.SetGETClearsBuffer(FALSE)
.