GetAvailGroups Method
- Last UpdatedNov 06, 2025
- 3 minute read
'Declaration
Public Shared Function GetAvailGroups( _
ByVal woId As String, _
ByVal operId As String, _
ByVal seqNo As Integer, _
ByVal stepNo As Nullable(Of Integer) _
) As DataSet
'Usage
Dim woId As String
Dim operId As String
Dim seqNo As Integer
Dim stepNo As Nullable(Of Integer)
Dim value As DataSet
value = DataLogGrp.GetAvailGroups(woId, operId, seqNo, stepNo)
Parameters
- woId
- Required. Holds the work order ID of the job.
- operId
- Required. Holds the operation ID of the job.
- seqNo
- Required. Holds the operation sequence number of the job.
- stepNo
- Optional filter parameter. Holds the step number associated to the job. To not include this filter, pass a null.
Return Value
Returns a DataSet that contains all the records in the Data_Log_Grp 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 |
|---|---|
| grp_id | An integer that is the unique ID of the data log group. |
| grp_desc | A string that is the description of the data log group. |
| max_value | An integer that is the maximum of number of sample values that can be collected for the data log group. Beginning with MES 7.0, this field is not used by the system. For new Data_Log_Group records, it defaults to 64. |
| collect_data | A Boolean that is a flag that indicates whether data collection is pending for this group. If true, data is not collected for all the value indexes in this group for the supplied job/step; otherwise, it is false. |
| certify | A Boolean that is a flag that indicates whether the collected data against the job has a pending certification. If true, the collected data is not certified; otherwise it is false. |
This method first retrieves the entity that is running the supplied job. If such an entity is identified, then the method queries the Data_Entry_Sched table against the following criteria to flag whether this data log group associated to this work order should collect data:
- The value for the key_id column in the Data_Entry_Sched table is linked to the row_id column in the Job/Job_Step table
- Jobs/job_steps are filtered by the supplied woId, operId, and seqNo, and optionally filtered by the stepNo.
- The supplied job must be currently running (job.state_cd = 3)
- The current row from the data_entry_sched.key_type should be collecting data for a job (=6)/job_step (=7 if non null value for a step number is supplied) and the category for the data collection should be ‘Datalog Group’ (data_entry_sched.category)
If a row is identified after applying all the filters specified above, then the middleware determines whether this group should collect data. Note that this only makes the data log group and its associated job/job_step eligible to collect data. It does not mean that the data collection is currently pending. If no rows are identified from the criteria above, then data does not need to be collected for this group or for a job/job_step that is linked to it.
If this group is eligible to collect data, then the middleware scans each row from the Data_Log table that is linked to the supplied job (data_log_grp_job_link) and ent (data_log_grp_ent_link), or data_log_grp_job_step_link if a non-null value for stepNo is supplied to determine the pending data collection. If any of the valuen columns in the Data_Log table is null and it is configured to have a value in the Data_Log_Value table (value_index) for this group, then it is considered that the data collection is pending for this data log row. Additionally, the data log groups that are retrieved are the ones that are linked to the supplied job in the Data_Log_Grp_Job_Link table and the ones that are linked to the running entity in the Data_Log_Grp_Ent_Link table or the Data_Log_Grp_Job_Step_Link table if a non-null value for a stepNo is supplied.
While determining whether a particular data log group has audit pending, the middleware scans each Data_Log row that is linked to a job (Data_Log_Grp_Job_Link table) and ent (Data_Log_Grp_Ent_Link table) or job_step (Data_Log_Grp_Job_Step_Link table). The row_id from the Data_Log table and the certification linked to these rows along with the supplied job/job_step must match those of the number of certifications in the Cert_Audit_Log table. If no such matching records exist in the Cert_Audit_Log table, then it is considered that this Data_Log row has a pending audit, which needs to be certified.