GetByFilter(String,Nullable<DateTime>,Nullable<DateTime>,String,String,Nullable<Int32>,String,Nullable<Int32>,String,String,Nullable<Int32>) Method
- Last UpdatedNov 06, 2025
- 6 minute read
'Declaration
Public Overloads Shared Function GetByFilter( _
ByVal sampleName As String, _
ByVal sampleTimeStart As Nullable(Of Date), _
ByVal sampleTimeEnd As Nullable(Of Date), _
ByVal status As String, _
ByVal userId As String, _
ByVal entId As Nullable(Of Integer), _
ByVal itemId As String, _
ByVal itemCategoryId As Nullable(Of Integer), _
ByVal woId As String, _
ByVal operId As String, _
ByVal seqNo As Nullable(Of Integer) _
) As DataSet
'Usage
Dim sampleName As String
Dim sampleTimeStart As Nullable(Of Date)
Dim sampleTimeEnd As Nullable(Of Date)
Dim status As String
Dim userId As String
Dim entId As Nullable(Of Integer)
Dim itemId As String
Dim itemCategoryId As Nullable(Of Integer)
Dim woId As String
Dim operId As String
Dim seqNo As Nullable(Of Integer)
Dim value As DataSet
value = Sample.GetByFilter(sampleName, sampleTimeStart, sampleTimeEnd, status, userId, entId, itemId, itemCategoryId, woId, operId, seqNo)
public static DataSet GetByFilter(
string sampleName,
Nullable<DateTime> sampleTimeStart,
Nullable<DateTime> sampleTimeEnd,
string status,
string userId,
Nullable<int> entId,
string itemId,
Nullable<int> itemCategoryId,
string woId,
string operId,
Nullable<int> seqNo
)
Parameters
- sampleName
- Optional filter parameter. Holds the name of a sample.
- sampleTimeStart
- Optional filter parameter. Holds the datetime that is compared to the requested_time. Only sample records that have a requested_time greater than or equal to the sampleTimeStart will be included in the result DataSet.
- sampleTimeEnd
- Optional filter parameter. Holds the datetime that will be compared to the requested_time. Only sample records which have a requested_time less than or equal to the sampleTimeEnd will be included in the result DataSet.
- status
- Optional filter parameter. Holds a sample status: 1 = READY, 2 = READY WARNING, 3 = MISSED, 4 = IN PROGRESS, 5 = LATE, 6 = COMPLETE, 7 = COMPLETE LATE, 8 = CANCELLED.
- userId
- Optional filter parameter. Holds the user ID of the user who pulled the sample.
- entId
- Optional filter parameter. Holds the ID of an existing entity. The result will be filtered by the entity and any of its descendants at which the sample was generated. The entity must be an existing entity in the Ent table.
- itemId
- Optional filter parameter. Holds the ID of an item from which a sample was generated.
- itemCategoryId
- Optional filter parameter. Holds the ID of an item category from which a sample was generated.
- woId
- Optional filter parameter. Holds the ID of a work order that identifies a job for which a sample was generated.
- operId
- Optional filter parameter. Holds the ID of an operation that identifies a job for which a sample was generated.
- seqNo
- Optional filter parameter. Holds a sequence number that identifies a job for which a sample was generated.
Return Value
Returns a DataSet that contains records from the Sample table that satisfy the specified filters. If no matching records are found, an empty DataSet is returned.
The columns of the returned DataSet are described below.
|
Column Name |
Description |
|---|---|
|
sample_name |
A string that is the name of the sample. |
|
ent_id |
An integer that is the ID of the entity at which the sample was generated. |
|
ent_name |
A string that is the name of the entity at which the sample was generated. |
|
item_id |
A string that is the ID of the item from which the sample was generated. |
|
wo_id |
A string that is the ID of the work order that is used to identify the job for which the sample was generated. |
|
oper_id |
A string that is the ID of the operation that is used to identify the job for which the sample was generated. |
|
seq_no |
An integer that is the sequence number that is used to identify the job for which the sample was generated. |
|
context_ent_id |
An integer that is the ID of the entity or entity class for the specification that caused the sample to be generated. |
|
context_ent_name |
A string that is the name of the entity or entity class for the specification that caused the sample to be generated. |
|
context_item_id |
A string that is the ID of the item for the specification that caused the sample to be generated. |
|
item_category_id |
An integer that is the ID of the item category for the specification that caused the sample to be generated. |
|
category_name |
A string that is the name of the item category for the specification that caused the sample to be generated. |
|
process_id |
A string that is the ID of the process for the specification that caused the sample to be generated. |
|
context_oper_id |
A string that is the ID of the operation for the specification that caused the sample to be generated. |
|
freq_id |
An integer that is the ID of the sample plan frequency based upon which the sample was generated. |
|
freq_name |
A string that is the name of the sample plan frequency based upon which the sample was generated, from the Sample_Freq table. |
|
segment_requirement_id |
A string for the user-specified S95 field. |
|
segment_response_id |
A string for the user-specified S95 field. |
|
lot_no |
A string that is the number of the lot from which the sample was pulled. |
|
sublot_no |
A string that is the number of the sublot from which the sample was pulled. |
|
requested_time_utc |
A datetime that is the UTC date/time when the sample was requested (readied). |
|
requested_time_local |
A datetime that is the local date/time, relative to the entity that corresponds to the sample, when the sample was requested (readied). |
|
requested_time |
A datetime that is the date/time, relative to the client who is requesting the data from the server, when the sample was requested (readied). |
|
expiry_time_utc |
A datetime that is the UTC date/time when the sample request expires. |
|
expiry_time_local |
A datetime that is the local date/time, relative to the entity that corresponds to the sample, when the sample request expires. |
|
expiry_time |
A datetime that is the date/time, relative to the client who is requesting the data from the server, when the sample request expires. |
|
warning_time_utc |
A datetime that is the UTC date/time when the sample request turns to READY WARNING. |
|
warning_time_local |
A datetime that is the local date/time, relative to the entity that corresponds to the sample, when the sample request turns to READY WARNING. |
|
warning_time |
A datetime that is the date/time, relative to the client who is requesting the data from the server, when the sample request turns to READY WARNING. |
|
pulled_by |
A string that identifies the person who pulled the sample. |
|
pulled_time_utc |
A datetime that is the UTC date/time when the sample was pulled. |
|
pulled_time_local |
A datetime that is the local date/time, relative to the entity that corresponds to the sample, when the sample was pulled. |
|
pulled_time |
A datetime that is the date/time, relative to the client who is requesting the data from the server, when the sample was pulled. |
|
final |
A Boolean that is a flag that indicates whether the sample has been marked as final, which would prohibit editing of any data associated with this sample. |
|
finalized_by |
A string that identifies the person who marked the sample as final. |
|
finalized_at_utc |
A datetime that is the UTC date/time when the sample was marked as final. |
|
finalized_at_local |
A datetime that is the local date/time, relative to the entity that corresponds to the sample, when the sample was marked as final. |
|
finalized_at |
A datetime that is the date/time, relative to the client who is requesting the data from the server, when the sample was marked as final. |
|
verified_by |
A string that identifies the person who verified the sample. |
|
sample_status |
An integer that is the status of the sample. |
|
sample_result |
An integer that is the result state of the sample. |
|
priority |
An integer that is the priority of measuring the sample. |
|
spare1 |
A string that is the sample spare1 value. |
|
spare2 |
A string that is the sample spare2 value. |
|
spare3 |
A string that is the sample spare3 value. |
|
spare4 |
A string that is the sample spare4 value. |
|
last_edit_comment |
A string that contains comments about why the record was added or modified. |
|
last_edit_at |
A datetime value that is the date/time when the record was added or last modified. |
|
last_edit_by |
A string that is the user who created or last modified this record. |
|
sample_id |
An integer that is the unique identifier of the sample. |