GetConsCount Method
- Last UpdatedNov 06, 2025
- 5 minute read
The GetConsCount() method retrieves a count of item consumption records based on the supplied filter.
'Declaration
Public Shared Sub GetConsCount( _
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), _
ByRef noOfConsRecords As Integer _
)
'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 noOfConsRecords As Integer
ItemCons.GetConsCount(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, noOfConsRecords)
public static void GetConsCount(
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,
out int noOfConsRecords
)
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 filter parameter. 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 filter parameter. 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 by which to filter the item consumption.
- 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.
- noOfConsRecords
- Output. Holds the returned number of consumption records that match the supplied filter parameters.