GetJobQueueByFilter(String,String,Boolean) Method
- Last UpdatedNov 06, 2025
- 9 minute read
The GetJobQueueByFilter() method retrieves job records from the Job table and associated tables, as specified by the supplied filters.
This overload of the method includes the includeScheduableParents parameter, which can be used to include jobs scheduled to ancestors of the entities specified by the filter parameters.
'Declaration
Public Overloads Shared Function GetJobQueueByFilter( _
ByVal entFilters As String, _
ByVal jobFilters As String, _
ByVal includeSchedulableParents As Boolean _
) As DataSet
public static DataSet GetJobQueueByFilter(
string entFilters,
string jobFilters,
bool includeSchedulableParents
)
Parameters
- entFilters
- Optional filter parameter. Holds a comma-delimited list of entity IDs.
- jobFilters
- Optional filter parameter. Holds a list of job filter criteria, each enclosed by the delimiters ‘$’ within the string.
- includeSchedulableParents
- Required. Holds a flag that indicates whether jobs that are scheduled to ancestors of the entities in the entity filter should be returned. If false, only jobs scheduled to the entities in the entity filter will be returned. If true, jobs scheduled to the entities in the entity filter and jobs scheduled to ancestors of the entities in the entity filter will be returned. If there are no entities in the entity filter, this flag has no effect.
Return Value
Returns a DataSet that contains all the records in the Job 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 |
|---|---|
| item_id |
A string that is the ID of the job item. |
|
item_desc |
A string that is the description of the item produced by the job, from Item table. |
|
uom_id_h |
A string that is the ID of the unit of measure for the item, from Item table. |
|
uom_description |
A string that is the description of the unit of measure for the item, from Uom table. |
|
lifetime |
A integer that is the the lifetime of this item before it expires, in days. If null, the item never expires. |
|
unit_cost |
A floating point number that is the cost for one unit of the item, from the Item table. |
|
item_class_id |
An integer that is the ID of the class to which the produced item belongs, from Item table. |
|
item_class_desc |
A string that is the description of the class to which the produced item belongs, from Item_Class table. |
|
process_id |
A string that is the ID of the process from which the job was created. |
|
process_status |
An integer that is the status of the process from which this job was created, from the Process table. |
|
wo_id |
A string that is the ID of the work order to which the job belongs. |
|
req_qty |
A floating point number that is the required quantity of the final item produced by the work order, from Wo table. |
|
release_time_utc |
A datetime field that is the release time of the work order in UTC, from the Wo table. |
|
release_time_local |
A datetime field that is the release time of the work order in the local time of the entity where the activity occurred, from the Wo table. |
|
release_time |
A datetime field that is the release time of the work order in the local time of the caller where the activity occurred, from the Wo table. |
|
wo_priority |
An integer that is the Priority of the work order, from the Wo table. |
|
cust_info |
A string that is the work order customer information, from the Wo table. |
|
oper_id |
A string that is the job operation ID. |
|
seq_no |
An integer that is the sequence number of the operation. |
|
job_desc |
A string that is the description of the job. |
|
state_cd |
An integer that is the current state of the job. |
|
job_priority |
An integer that is the priority of the job. |
|
req_finish_time_utc |
A datetime field that is the time required to finish the operation in UTC. |
|
req_finish_time_local |
A datetime field that is the time required to finish the operation in the local time of the entity where the activity occurred. |
|
req_finish_time |
A datetime field that is the time required to finish the job in the local time of the entity where the activity occurred. |
|
target_sched_ent_id |
An integer that is the ID of the target schedule entity. |
|
ent_name |
A string that is the name of the entity to which the job needs to scheduled, from Ent table. |
|
qty_reqd |
A floating point number that is the quantity that the job must produce. |
|
qty_prod |
A floating point number that is the quantity already produced. |
|
qty_rejected |
A floating point number that is the quantity already rejected. |
|
qty_at_start |
A floating point number that is the quantity the job will produce if nothing is scrapped. |
|
batch_size |
A floating point number that is the batch size. |
|
first_job |
A Boolean that is a flag that specifies whether this is a first job in the work order. |
|
final_job |
A Boolean that is a flag that specifies whether this is a final job in the work order. |
|
est_prod_rate |
A floating point number that is the estimated entity batch rate or time, depending on the produced item unit of measure. |
|
sched_start_time_utc |
A datetime field that is the scheduled start time for the job in UTC. |
|
sched_start_time_local |
A datetime field that is the scheduled start time for the job in the local time of the entity where the activity occurred. |
|
sched_start_time |
A datetime field that is the scheduled start time for the job in the local time for the caller where the activity occurred. |
|
latest_start_time_utc |
A datetime field that is the latest time the job may start in UTC. |
|
latest_start_time_local |
A datetime field that is the latest time the job may start in the local time for the entity where the activity occurred. |
|
latest_start_time |
A datetime field that is the latest time the job may start in the local time for the caller where the activity occurred. |
|
sched_finish_time_utc |
A datetime field that is the scheduled finish time for the job in UTC. |
|
sched_finish_time_local |
A datetime field that is the scheduled finish time for the job in the local time for the entity where the activity occurred. |
|
sched_finish_time |
A datetime field that is the Scheduled finish time for the job in the local time for the entity where the activity occurred. |
|
notes |
A string that is the job notes. |
|
status_notes |
A string that is the job status notes. |
|
state_desc_h |
A string that is the description of the current state of the job, from the Job_State table. |
|
color_h |
An integer that is the color (as RGB value) in which the job should be displayed to indicate the state, from the job_state table. |
|
oper_desc |
A string that is the description of the operation, from the Oper table. |
|
act_start_time_utc |
A datetime field that is the actual starting time of the job in UTC. |
|
act_start_time_local |
A datetime field that is the actual starting time of the job in the local time of the entity where the activity occurred. |
|
act_start_time |
A datetime field that is the the actual starting time of the job in the local time for the caller where the activity occurred. |
|
act_finish_time_utc |
A datetime field that is the actual finish time of the job in UTC. |
|
act_finish_time_local |
A datetime field that is the actual finish time of the job in the local time of the entity where the activity occurred. |
|
act_finish_time |
A datetime field that is the the actual finish time of the job in the local time for the caller where the activity occurred. |
|
can_sched_jobs |
A Boolean that is a flag that specifies whether the targeted scheduled entity can schedule jobs, from the Ent table |
|
mo_id |
A string that is the ID of the manufacturing order to which the work order belongs, from the Wo table. |
|
run_ent_id |
An integer that is the ID of the entity on which the job is run. |
|
run_ent_name |
A string that is the name of the entity on which the job is run. |
|
row_id_h |
An integer that is the ID of the row in the Job table. |
|
num_decimals_h |
An integer that is the number of decimals to be used in displaying quantities for the item produced by the job. |
|
num_decimals_good_pp |
An integer that is the value of the system attribute Max decimals of good piece part entries (attr_id 326 in the System_Attr table) and is used when the num_decimals column is 0. |
|
spare1 |
A string that is the contents of the user-defined spare1 field, from Item table. |
|
spare2 |
A string that is the contents of the user-defined spare1 field, from Item table. |
|
spare3 |
A string that is the contents of the user-defined spare1 field, from Item table. |
|
spare4 |
A string that is the contents of the user-defined spare1 field, from Item table. |
|
edit_time_h |
A string that is the last time the job record was edited. |
|
job_pos_h |
An integer that is the job position used to run the job; from the Job_Exec table. |
|
def_lot_no |
A string that is the default lot number for items produced by the job; from the Job_Bom table. |
|
job_spare1 |
A string that is the contents of the user-defined job spare1 field. |
|
job_spare2 |
A string that is the contents of the user-defined job spare2 field. |
|
job_spare3 |
A string that is the contents of the user-defined job spare3 field. |
|
job_spare4 |
A string that is the contents of the user-defined job spare4 field. |
|
concurrent_link |
An integer that is the number used to link the job to others so all jobs start at the same time. A value of 0 denotes that the job not linked. |
|
wo_desc |
A string that is the description of the work order; from Wo table. |
|
queue_item_item_id_h |
A string that identifies the item whose attributes are to be included in the returned array for display in the queue. The item attributes that are returned are those whose visible_in_queue flag is set to true. The attribute information is returned as the following column pair:
|
|
queue_job_wo_id_h |
A string that is the ID of the work order that, along with the queue_job_oper_id_h and queue_job_seq_no_h columns, identify the job whose attributes are to be included in the returned array for display in the queue. The job attributes that are returned are those whose visible_in_queue flag is set to true. The attribute information is returned as the following column pair:
|
|
queue_job_oper_id_h |
A string that is the ID of the operation that is used to identify the job whose attributes are to be included in the returned array for display in the queue. |
|
queue_job_seq_no_h |
An integer that is the sequence number that is used to identify the job whose attributes are to be included in the returned array for display in the queue. |
The jobFilters filter parameter contains a series of filter types and filters. Each filter group in the string is enclosed by ‘$’. It is not necessary to include all the filter groups, but they must be provided in the order listed. For example, to specify just the item_desc, all the preceding filters must also be supplied.
The format for the jobFilters filter parameter is:
$1,2,3,4,5,6,7$$CANCELLED=0$$COMPLETED=0$$WO_ID=$
$OPER_ID=$$SEQ_NO=$$ITEM_ID=$$ITEM_DESC=$$FIRST_JOB=0$
- The first filter criterion of the format is a comma-separated list of job states. Only jobs with one of those states will be fetched. The job states are:
1 = NEW
2 = READY
3 = RUNNING
4 = COMPLETE
5 = SUSPEND
6 = ONHOLD
7 = CANCELLED
- The CANCELLED filter criterion is the number of hours old a cancelled job may be and still get fetched; 0 means fetch all cancelled jobs.
- The COMPLETED filter criterion is the number of hours old a completed job may be and still get fetched; 0 means fetch all completed jobs.
- The following parameter filter criteria can be specified: wo_id, oper_id, seq_no, item_id, and item_desc. The values for these parameters can be partial entries, specified using the % wildcard character.
- The FIRST_JOB filter criterion is a flag that, if true (1), specifies to fetch only the first jobs of the work orders.
Example entFilters and jobFilters Strings
The following entFilters and jobFilters strings will retrieve the jobs scheduled for the entity whose ID is 30, that are in any job state, and that have 8467 in the wo_id.
entFilters = "30"
jobFilters = "$1,2,3,4,5,6,7$$CANCELLED=0$$COMPLETED=0$$WO_ID=%8467%$"
For item or job attributes to be returned by this method, the attribute must be marked as visible in the queue or inventory.
For example, if there is a job attribute defined as MyJobAttr and it gets assigned attribute ID 18 by the MES system, then the columns returned in the dataset will be Attr18 and Attr18d_h, where the column Attr18 will hold the value set by the user and column Attr18d_h will have the value “MyJobAttr” (in this example).