Update Method (Attr)
- Last UpdatedNov 06, 2025
- 3 minute read
'Declaration
Public Shared Sub Update( _
ByVal sessionId As Integer, _
ByVal attrId As Integer, _
ByVal predefined As Boolean, _
ByVal dataType As Integer, _
ByVal attrDesc As String, _
ByVal attrGrp As Integer, _
ByVal filtr As DBString, _
ByVal entryType As Integer, _
ByVal visibleInQueue As Boolean, _
ByVal visibleInInv As Boolean, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim attrId As Integer
Dim predefined As Boolean
Dim dataType As Integer
Dim attrDesc As String
Dim attrGrp As Integer
Dim filtr As DBString
Dim entryType As Integer
Dim visibleInQueue As Boolean
Dim visibleInInv As Boolean
Dim lastEditComment As DBString
Dim lastEditAt As Date
Attr.Update(sessionId, attrId, predefined, dataType, attrDesc, attrGrp, filtr, entryType, visibleInQueue, visibleInInv, lastEditComment, lastEditAt)
public static void Update(
int sessionId,
int attrId,
bool predefined,
int dataType,
string attrDesc,
int attrGrp,
DBString filtr,
int entryType,
bool visibleInQueue,
bool visibleInInv,
DBString lastEditComment,
ref DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- attrId
- Required. Holds the ID of the attribute whose record is being updated.
- predefined
- Required. Holds a flag that, if set to true, specifies that the attribute is assigned to a set of predefined values.
- dataType
Required. Holds the enumeration that indicates the data type of the attribute.
0 = string (less than 80 characters; the default)
1 = drop down from values defined in attr_set table
2 = integer
3 = currency
4 = color
5 = datetime
6 = floating point number
7 = percent
8 = check box
9 = non-editable
10 = time of day
11 = item reason (only if attr_grp = 3)
12 = long string (> 80 characters)
May be extended in future releases.
- attrDesc
- Required. Holds the attribute description. The description must be unique within a given attribute group.
- attrGrp
Required. Holds the enumeration that identifies the group to which the attribute belongs.
1 = Items
2 = Entities
3 = Lots
4 = Item Classes
5 = Jobs
6 = WO
7 = Operations
8 = Processes
9 = Sublot
10 = Samples
11 = Results
12 = Lines
13 = Shifts
- filtr
- Required. Holds the string that identifies the filter for the situations to which this attribute applies. For example, for item reason attributes, this is a reason_grp_id.
- entryType
Required. Holds the enumeration that indicates the type of entry to allow for this attribute.
0 = value only (the default)
1 = notes only
2 = value and notes
- visibleInQueue
- Required. Holds a flag that, if set to true, specifies that this attribute will be visible in the job queue. The default is false. It may be true only if attr_grp = 1, 5, or 6, entry_type is not 1, and data_type is not 12.
- visibleInInv
- Required. Holds a flag that, if set to true, specifies that this attribute will be visible in the inventory. The default is false. It may be true only if attr_grp = 1 or 3, entry_type is not 1, and data_type is not 12.
- lastEditComment
- Required. Holds comments that describe why this record is being updated.
- lastEditAt
Required. Holds the date/time when this record was added or last updated, for optimistic concurrency control. The passed value must match the lastEditAt value in the record for the update to succeed.
Output. Holds the date/time value when the record was updated by this called method.