GetByFilter Method (SamplePlan)
- Last UpdatedNov 06, 2025
- 2 minute read
The GetByFilter() method retrieves the records from the Sample_Plan table that fit within the filtered dataset.
'Declaration
Public Shared Function GetByFilter( _
ByVal planName As String, _
ByVal planDesc As String _
) As DataSet
'Usage
Dim planName As String
Dim planDesc As String
Dim value As DataSet
value = SamplePlan.GetByFilter(planName, planDesc)
Parameters
- planName
- Optional filter parameter. Holds the unique name of the sample plan for display.
- planDesc
- Optional filter parameter. Holds a description of the sample plan.
Return Value
Returns a DataSet that contains records from the Sample_Plan 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 |
|---|---|
| plan_name | A string that is the name of the sample plan. |
| plan_desc | A string that is a description of the sample plan. |
| category_id | An integer that identifies the category that the sample plan belongs to. |
| verified_write | A flag that indicates whether or not an operator confirmation of manually entered values is required. |
| sample_name | A string that defines a pattern sample names are to follow. Default is "SamplePlanNameYYYYMMDD####". |
| reset_option | An integer that indicates when an octothorpe values within the sample plan name should be reset to 1. |
| spare1 | A string that is the contents of the user-defined spare1 field. |
| spare2 | A string that is the contents of the user-defined spare2 field. |
| spare3 | A string that is the contents of the user-defined spare3 field. |
| spare4 | A string that is the contents of the user-defined spare4 field. |
| last_edit_comment | A string that contains comments about why the record was updated. |
| last_edit_by | A string that is the ID of the user who added or last updated this record. |
| last_edit_at | A date/time that indicates when the record was added or last updated. |
| plan_id | An integer that is the ID of the sample plan. |