GetItems Method (Item)
- Last UpdatedNov 06, 2025
- 3 minute read
'Declaration
Public Shared Function GetItems( _
ByVal filterOption As Integer, _
ByVal itemFilters As String, _
ByVal criteria As String _
) As DataSet
public static DataSet GetItems(
int filterOption,
string itemFilters,
string criteria
)
Parameters
- filterOption
- Required. Not currently used. The value must be 0.
- itemFilters
- Optional. Holds a string that includes several item filter criteria. See Remarks for the available filter criteria.
- criteria
- Optional. Not currently used.
Return Value
Returns a DataSet that contains all the records in the Item 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 item. |
|
item_desc |
A string that is the description of the item. |
|
item_class_id |
A string that is the ID of the item class that is linked to this item. |
|
item_class_desc |
A string that is the description of the item class, from the item_class.item_class_desc column linked to the item class ID for this item. |
|
template |
A Boolean that is a flag that indicates whether this item is a real manufacturing part (if false) or a generic part (if true). |
|
i_obsolete |
A Boolean that is a flag that indicates whether this item is obsolete. |
|
produced |
A Boolean that is a flag that indicates whether the item class linked to this item is produced. |
|
consumed |
A Boolean that is a flag that indicates whether the item class linked to this item is consumed. |
|
ic_obsolete |
A Boolean that is a flag that indicates whether the item linked to the class is obsolete. |
The itemFilters filter parameter includes four types of filter criteria: item class, item class attribute, item, and item attribute. Each filter criterion in the string is enclosed by the delimiters ‘$’.
The general format for the itemFilters parameter string is:
$ICF:$$ICFFilterCriterion1=value1$$ICFFilterCriterion2=value2$ ... $$ICA:$$ICAFilterCriterion1=value1$...$
$IF:$$IFFilterCriterion1=value1$$IFFilterCriterion2=value2$ ... $$IA:$$IAFilterCriterion1=value1$...$
where:
ICF = Item Class Filter
ICA = Item Class Attribute
IF = Item Filter
IA = Item Attribute filter
Note that the order of the filter types in the string must be in the order shown above.
The available filter criteria for the item class and item filter types are listed below.
Item Class Filter Criteria:
item_class_id
item_class_desc
consumed
produced
obsolete
Item Filter Criteria:
item_id
item_desc
units
uom_id
template
lifetime
unit_cost
obsolete
num_decimals
spare1
spare2
spare3
spare4
An item class attribute or item attribute filter criterion is specified by its ID. Also, both of the attribute filter type criteria portions of the string require an additional set of '$' delimiters around them.
Examples
The following filter string will retrieve all items for which the item class is marked as produced, the item class description contains "bottle", and the item description contains "red".
$ICF:$$ITEM_CLASS_DESC=%bottle%$$PRODUCED=1$$IF:$$ITEM_DESC=%red%$
Assuming that there is a Purchasing Agent item attribute whose attribute ID is 2 and a model number item attribute whose attribute ID is 10, the following string will retrieve items whose purchasing agent is Smith and whose model number is XB43Z
$$IA:$$2=Smith$$10=XB43Z$$