GetJobs Method
- Last UpdatedNov 06, 2025
- 5 minute read
'Declaration
Public Shared Function GetJobs( _
ByVal filterOption As Integer, _
ByVal jobFilters As String, _
ByVal criteria As String _
) As DataSet
public static DataSet GetJobs(
int filterOption,
string jobFilters,
string criteria
)
Parameters
- filterOption
- Required. Holds an integer that specifies the columns that should be included in the returned DataSet.
- jobFilters
- Optional filter parameter. Holds a list of job filter criteria, each surrounded by ‘$’ within the string.
- criteria
- Optional. Holds the filter data. The data will be interpreted according to the filterOption parameter setting.
Return Value
Returns a DataSet that contains records for all the jobs that satisfy the specified filters. The returned records include columns from the Cust, So, So_Line, Wo, Item_Class, Item, and Job_Bom tables. If no matching jobs are found, an empty DataSet is returned.
For Filter option= 0, the columns of the returned DataSet are described below.
|
Column |
Description |
|---|---|
|
cust_id |
A string that is the ID of the customer for the work order, from the Cust table. |
|
cust_name |
A string that is the name of the customer, from the Cust table. |
|
po_id |
A string that is the sales order ID for the work order, from the So table. |
|
so_line_no |
An integer taht is the line item number for the sales order, from the So_Line table. |
|
quantity |
A floating point number taht is the number of items needed for the sales order, from the So_Line table. |
|
item_id |
A string that is the ID of the item to produce for the sales order from the So_Line table. |
|
reqd_by_utc |
A datetime field specifying when the goods for this line are required in UTC, from the So_Line table. |
|
reqd_by_local |
A datetime field specifying when the goods for this line are required in local time where the activity occured, from the So_Line table. |
|
reqd_by |
A datetime field specifying when the sales order must be filled in local time of the caller, generated. |
|
wo_id |
A string that is the ID of the work order to fill the sales order, from the Wo table |
|
wo_desc |
A string that is the description of the work order, from the Wo table. |
For Filter option= 1, the columns of the returned DataSet are described below.
|
Column |
Description |
|---|---|
|
item_class_id |
An integer taht is the ID of the class to which the produced item belongs, from the Item_Class table. |
|
item_class_desc |
A string that is the description of the class to which the produced item belongs, from the Item_Class table. |
|
item_id |
A string that is the ID of the item being produced, from the Item table. |
|
item_desc |
A string that is the description of the item being produced, from the Item table. |
|
wo_id |
A string that is the ID of the work order producing the item, from the Wo table. |
|
wo_desc |
A string that is the description of the work order producing the item, from the Wo table. |
For Filter option= 2, the columns of the returned DataSet are described below.
|
Column |
Description |
|---|---|
|
mo_id |
manufacturing order to which the work order belongs, from the Wo table. |
|
wo_id |
ID of the work order producing the item; from the Wo table. |
|
wo_desc |
A string that is the description of the work order producing the item, from the Wo table. |
For Filter option= 100, 101, and 102, the columns of the returned DataSet are described below.
|
Column |
Description |
|---|---|
|
wo_id |
A string that is the ID of the work order producing the item, from the Wo table. |
|
oper_id |
A string that is the Id of the operation |
|
seq_no |
An integer that is the sequence number of the operation. |
|
target_sched_ent_id |
An integer that is the ID of the entity to which the job should be scheduled |
|
ent_name |
A string that is the name of the entity to which the job should be scheduled; from the Ent table. |
|
display_seq |
An integer that is the display sequence for the job. |
For Filter option= 103, the columns of the returned DataSet are described below.
|
Column |
Description |
|---|---|
|
wo_id |
A string that is the ID of the work order producing the item, from the Wo table. |
|
oper_id |
A string that is the Id of the operation. |
|
seq_no |
An integer that is the sequence number of the operation. |
|
bom_pos |
An integer that is the position of the item in the job BOM, from the Job_Bom table |
|
item_id |
A string that is the ID of the item being at theBOM position, from the Item table. |
|
item_desc |
A string that is the description of the item being at the BOM position, from the Item table. |
For Filter option= 201, the columns of the returned DataSet are all the columns in the work order (WO) table .
For Filter option= 202, the columns of the returned DataSet are all the columns in the job table. For this filter option, a row will be returned for each job that belongs to a work order which matches the supplied filter.
The criteria filter parameter is interpreted as follows:
- For FilterOption 0, 1, or 2: Criteria is not used
- For FilterOption 100: Criteria = Sales Order Line Number (SO_WO_Link.so_line_no)
- For FilterOption 101: Criteria = Item ID (WO.item_id)
- For FilterOption 102: Criteria = Manufacturing Order (WO.mo_id)
- For FilterOption 103: Criteria = Operation ID (Job.oper_id)
- For FilterOption 201: Criteria is not used
- For FilterOption 202: Criteria is not used
For FilterOption 103, the JobFilters string contains the work order ID (Job.wo_id).
The jobFilters filter parameter contains a series of filter types and filters. For all filterOption values except for 103, each filter type and filter is surrounded by ‘$’ in the string. A filter type precedes each set of filters corresponding to that type.
For example, for the item filters, the format would be:
$IF:$$ITEM_ID=’item ID’$$ITEM_DESC=’item description’$...
Thus, the general format for the JobFilters string is:
$TYPE1:$$LABEL1=’value1’$$LABEL2=’value2’$…$TYPE2:$$LABEL3=’value3’$...
The available filter types are:
BOM = Bill of Materials
IA = Item Attributes
ICA = Item Class Attributes
ICF = Item Class Filter
IF = Item Filter
JA = Job Attributes
JF = Job Filter
JSF = Job State Filter
PA = Process Attributes
PF = Process Filter
WA = Work Order Attributes
WOF = Work Order Filter
The available filters within each of these types are listed below.
BOM Filters:
SHOW_BOM
Item Class Filters:
ITEM_CLASS_ID
ITEM_CLASS_DESC
CONSUMED
Item Filters:
ITEM_ID
ITEM_DESC
UOM_ID
LIFETIME
UNIT_COST
SPARE1
SPARE2
SPARE3
SPARE4
Job Filters:
WO_ID
LAST_ENTITY_RUN_ON
OPER_ID
SCHEDULABLE_ENTITY
SCHEDULED_ENTITY
Job State Filters:
NEW
READY
RUNNING
COMPLETE
SUSPEND
ONHOLD
CANCELLED
Process Filters:
PROCESS_ID
PROCESS_STATUS
Work Order Filters:
WO_ID
REQD_QTY
RELEASE_DATE_TIME
DUE_DATE_TIME
WO_PRIORITY
CUSTOMER
MANF_ORDER
WO_STATE
For all of the attribute types (IA, ICA, JA, PA and WA), the attribute ID is used, that is,
$<attrID>=’value’$.