GetConsByFilter Method
- Last UpdatedNov 06, 2025
- 8 minute read
'Declaration
Public Shared Function GetConsByFilter( _
ByVal woId As String, _
ByVal operId As String, _
ByVal seqNo As Nullable(Of Integer), _
ByVal shiftId As Nullable(Of Integer), _
ByVal shiftStartStart As Nullable(Of Date), _
ByVal shiftStartEnd As Nullable(Of Date), _
ByVal itemId As String, _
ByVal itemDesc As String, _
ByVal lotNo As String, _
ByVal fgLotNo As String, _
ByVal subLotNo As String, _
ByVal fgSubLotNo As String, _
ByVal reasCd As Nullable(Of Integer), _
ByVal gradeCd As Nullable(Of Integer), _
ByVal statusCd As Nullable(Of Integer), _
ByVal runEntId As Nullable(Of Integer), _
ByVal storageEntId As Nullable(Of Integer), _
ByVal qtyMin As Nullable(Of Double), _
ByVal qtyMax As Nullable(Of Double), _
ByVal userId As String, _
ByVal userDesc As String, _
ByVal extRef As String, _
ByVal itemScrapped As Nullable(Of Boolean), _
ByVal transactionType As Nullable(Of Integer), _
ByVal genealogyId As String, _
ByVal upstreamEventId As String, _
ByVal segmentRequirementId As String, _
ByVal segmentResponseId As String, _
ByVal comments As String, _
ByVal spare1 As String, _
ByVal spare2 As String, _
ByVal spare3 As String, _
ByVal spare4 As String, _
ByVal createdAtStart As Nullable(Of Date), _
ByVal createdAtEnd As Nullable(Of Date), _
ByVal rowId As Nullable(Of Integer) _
) As DataSet
'Usage
Dim woId As String
Dim operId As String
Dim seqNo As Nullable(Of Integer)
Dim shiftId As Nullable(Of Integer)
Dim shiftStartStart As Nullable(Of Date)
Dim shiftStartEnd As Nullable(Of Date)
Dim itemId As String
Dim itemDesc As String
Dim lotNo As String
Dim fgLotNo As String
Dim subLotNo As String
Dim fgSubLotNo As String
Dim reasCd As Nullable(Of Integer)
Dim gradeCd As Nullable(Of Integer)
Dim statusCd As Nullable(Of Integer)
Dim runEntId As Nullable(Of Integer)
Dim storageEntId As Nullable(Of Integer)
Dim qtyMin As Nullable(Of Double)
Dim qtyMax As Nullable(Of Double)
Dim userId As String
Dim userDesc As String
Dim extRef As String
Dim itemScrapped As Nullable(Of Boolean)
Dim transactionType As Nullable(Of Integer)
Dim genealogyId As String
Dim upstreamEventId As String
Dim segmentRequirementId As String
Dim segmentResponseId As String
Dim comments As String
Dim spare1 As String
Dim spare2 As String
Dim spare3 As String
Dim spare4 As String
Dim createdAtStart As Nullable(Of Date)
Dim createdAtEnd As Nullable(Of Date)
Dim rowId As Nullable(Of Integer)
Dim value As DataSet
value = ItemCons.GetConsByFilter(woId, operId, seqNo, shiftId, shiftStartStart, shiftStartEnd, itemId, itemDesc, lotNo, fgLotNo, subLotNo, fgSubLotNo, reasCd, gradeCd, statusCd, runEntId, storageEntId, qtyMin, qtyMax, userId, userDesc, extRef, itemScrapped, transactionType, genealogyId, upstreamEventId, segmentRequirementId, segmentResponseId, comments, spare1, spare2, spare3, spare4, createdAtStart, createdAtEnd, rowId)
public static DataSet GetConsByFilter(
string woId,
string operId,
Nullable<int> seqNo,
Nullable<int> shiftId,
Nullable<DateTime> shiftStartStart,
Nullable<DateTime> shiftStartEnd,
string itemId,
string itemDesc,
string lotNo,
string fgLotNo,
string subLotNo,
string fgSubLotNo,
Nullable<int> reasCd,
Nullable<int> gradeCd,
Nullable<int> statusCd,
Nullable<int> runEntId,
Nullable<int> storageEntId,
Nullable<double> qtyMin,
Nullable<double> qtyMax,
string userId,
string userDesc,
string extRef,
Nullable<bool> itemScrapped,
Nullable<int> transactionType,
string genealogyId,
string upstreamEventId,
string segmentRequirementId,
string segmentResponseId,
string comments,
string spare1,
string spare2,
string spare3,
string spare4,
Nullable<DateTime> createdAtStart,
Nullable<DateTime> createdAtEnd,
Nullable<int> rowId
)
Parameters
- woId
- Optional filter parameter. Holds the work order ID for identifying the job that consumed an item.
- operId
- Optional filter parameter. Holds the operation ID for identifying the job that consumed an item.
- seqNo
- Optional filter parameter. Holds the operation sequence number for identifying the job that consumed an item.
- shiftId
- Optional filter parameter. Holds the ID of the shift during which an item was consumed.
- shiftStartStart
- Optional filter parameter. Holds the start time of the shift during which an item was consumed.
- shiftStartEnd
- Optional filter parameter. Holds the end time of the shift during which an item was consumed.
- itemId
- Optional filter parameter. Holds the ID of a consumed item.
- itemDesc
- Optional filter parameter. Holds the description of a consumed item.
- lotNo
- Optional filter parameter. Holds the lot number of a consumed item.
- fgLotNo
- Optional. Holds the lot number of finished goods for which the item was consumed.
- subLotNo
- Optional filter parameter. Holds the sublot number of a consumed item.
- fgSubLotNo
- Optional. Holds the sublot number of finished goods for which the item was consumed.
- reasCd
- Optional filter parameter. Holds a reason code that uniquely identifies grade + status of goods consumed.
- gradeCd
- Optional filter parameter. Holds the grade code of consumed goods.
- statusCd
- Optional filter parameter. Holds the status code of consumed goods.
- runEntId
- Optional filter parameter. Holds the ID of the entity on which the job that consumed an item is running.
- storageEntId
- Optional filter parameter. Holds the ID of the storage entity from which the consumed item was moved.
- qtyMin
- Optional filter parameter. Holds a minimum quantity so that any consumption that is equal to or greater than this quantity will be retrieved.
- qtyMax
- Optional filter parameter. Holds a maximum quantity by which to filter the item consumption.
- userId
- Optional filter parameter. Holds the ID of the user who ran the job that consumed an item.
- userDesc
- Optional filter parameter. Holds the description of the user who ran the job that consumed an item.
- extRef
- Optional filter parameter. Holds the reference to the external system for defect tracking or any other purpose.
- itemScrapped
- Optional filter parameter. Holds a flag that specifies whether an item is designated as scrapped.
- transactionType
Optional filter parameter. Holds an enumeration that indicates the transaction type.
0 = normal
1 = lot split
2 = combination
- genealogyId
- Optional filter parameter. Holds a genealogy ID.
- upstreamEventId
- Optional filter parameter. Holds the ID of an upstream event.
- segmentRequirementId
- Optional filter parameter. Holds a segment requirement ID.
- segmentResponseId
- Optional filter parameter. Holds a segment response ID.
- comments
- Optional filter parameter. Holds comments about the consumed item.
- spare1
- Optional filter parameter. Holds the contents of the user-defined spare1 field.
- spare2
- Optional filter parameter. Holds the contents of the user-defined spare2 field.
- spare3
- Optional filter parameter. Holds the contents of the user-defined spare3 field.
- spare4
- Optional filter parameter. Holds the contents of the user-defined spare4 field.
- createdAtStart
- Optional filter parameter. Holds the start time of the creation of an item consumption's record.
- createdAtEnd
- Optional filter parameter. Holds the end time of the creation of an item consumption's record.
- rowId
- Optional filter parameter. Holds the row ID of an item consumption record.
Return Value
Returns a DataSet that contains consumption records based on the supplied filters. If no records are found for the specified parameters, an empty DataSet is returned.
The columns of the returned DataSet are described below.
|
Column Name |
Description |
|---|---|
|
row_id |
An integer that is the record’s unique row ID. |
|
wo_id |
A string that is the work order ID for identifying the job that consumed the item. |
|
oper_id |
A string that is the operation ID for identifying the job that consumed the item. |
|
seq_no |
An integer that is the operation sequence number for identifying the job that consumed the item. |
|
shift_start_utc |
A datetime that is the time of the shift start in UTC. |
|
shift_start_local |
A datetime that is the time of the shift start in the local time of the entity at which the consumption occurred. |
|
shift_start |
A datetime that is the time of the shift start in the local time of the client application that is making the call. |
|
item_id |
A string that is the ID of the consumed item. |
|
item_desc |
A string that is the item description, from the Item table. |
|
serial_no_lvl |
An integer that indicates the level being used, lot or sublot, to indicate individual serial numbers, from the Item table.
|
|
lot_no |
A string that is the lot number of the consumed item. |
|
fg_lot_no |
A string that is the lot number of the parent item. |
|
sublot_no |
A string that is the sublot number of consumed item. |
|
fg_sublot_no |
A string that is the sublot number of the parent item. |
|
reas_cd |
An integer that is reason that uniquely identifies the grade + status of goods consumed. |
|
reas_desc |
A string that is the reason description, from the Item_Reas table. |
|
user_id |
A string that is the ID of the user who ran the job that consumed the item. |
|
user_desc |
A string that is the description of the user who ran the job that consumed the item. |
|
item_scrapped |
A Boolean that is a flag that specifies whether the consumed item is waste. |
|
ent_id |
An integer that is the ID of the entity at which the item was consumed. |
|
ent_name |
A string that is the name of the entity at which the item was consumed, from the Ent table. |
|
shift_id |
An integer that is ID of the shift during which the item was consumed. |
|
shift_desc |
A string that is the description of the shift during which the item was consumed, from the Shift table. |
|
grade_cd |
An integer that is the grade code of the consumed goods. |
|
item_grade_desc |
A string that is the grade description, from the Item_Grade table. |
|
item_grade_color |
An integer that is RGB background color of the item grade, from the Item_Grade table. |
|
status_cd |
An integer that is the status code of the consumed goods. |
|
item_status_desc |
A string that is the status description, from the Item_State table. |
|
item_state_color |
An integer that is RGB background color of the item state, from the Item_State table. |
|
from_ent_id |
An integer that is ID of the storage entity from which the item was consumed. |
|
from_ent_name |
A string that is name of the storage entity from which the item was consumed, from the Ent table |
|
qty_cons |
A double that is the quantity consumed. |
|
qty_cons_erp |
A double that is the quantity consumed value that was reported to an ERP system. |
|
ext_ref |
A string that is the reference to an external system for defect tracking or any other purpose. |
|
transaction_type |
An integer that is the transaction type enumerated value.
|
|
genealogy_id |
A string that is the genealogy ID. |
|
upstream_event_id |
A string that is the upstream event ID. |
|
segment_requirement_id |
A string that is the segment requirement ID. |
|
segment_response_id |
A string that is the segment response ID. |
|
comments |
A string that is the comments about the item consumption. |
|
spare1 |
A string that is the content of the user-defined spare1 field. |
|
spare2 |
A string that is the content of the user-defined spare2 field. |
|
spare3 |
A string that is the content of the user-defined spare3 field. |
|
spare4 |
A string that is the content of the user-defined spare4 field. |
|
last_edit_comment |
A string that contains comments about why the record was added or updated. |
|
last_edit_by |
A string that is the ID of the user who added or last updated this record. |
|
last_edit_at |
A datetime that indicates when the record was added or last updated. |
|
created_at_utc |
A datetime that indicates when the record was created in UTC. |
|
created_at_local |
A datetime that indicates when the record was created in the local time of the entity at which the consumption occurred. |
|
created_at |
A datetime that indicates when the record was created in the local time of the client application that is making the call. |
|
row_id |
An integer that is the record’s unique row ID. |