Add Method (Characteristic)
- Last UpdatedNov 06, 2025
- 12 minute read
The Add() method adds a new characteristic record to the Characteristic table.
'Declaration
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal charName As String, _
ByVal charDesc As DBString, _
ByVal type As Nullable(Of Integer), _
ByVal uomId As Integer, _
ByVal severityCd As Nullable(Of Integer), _
ByVal defaultChart As Nullable(Of Integer), _
ByVal automatedColl As Nullable(Of Boolean), _
ByVal timeInterval As DBInt, _
ByVal timeIntUnit As DBInt, _
ByVal numberDecimals As Nullable(Of Integer), _
ByVal sampleSizeSource As DBInt, _
ByVal normalSampleSize As Nullable(Of Integer), _
ByVal minimumSampleSize As Nullable(Of Integer), _
ByVal maximumSampleSize As DBInt, _
ByVal numberDefectOpp As DBInt, _
ByVal movAvgSpan As DBInt, _
ByVal sigmaEst As DBInt, _
ByVal trendLimits As Nullable(Of Boolean), _
ByVal useStdErr As Nullable(Of Boolean), _
ByVal clSource As DBInt, _
ByVal samplesForCl As DBInt, _
ByVal samplesBeforeCl As Nullable(Of Integer), _
ByVal stdAvg As DBDouble, _
ByVal stdAvgIsTarget As Nullable(Of Boolean), _
ByVal stdDeviation As DBDouble, _
ByVal clXbar As DBDouble, _
ByVal lclXbar As DBDouble, _
ByVal uclXbar As DBDouble, _
ByVal clRange As DBDouble, _
ByVal lclRange As DBDouble, _
ByVal uclRange As DBDouble, _
ByVal clSigma As DBDouble, _
ByVal lclSigma As DBDouble, _
ByVal uclSigma As DBDouble, _
ByVal clIx As DBDouble, _
ByVal lclIx As DBDouble, _
ByVal uclIx As DBDouble, _
ByVal clImr As DBDouble, _
ByVal lclImr As DBDouble, _
ByVal uclImr As DBDouble, _
ByVal clMa As DBDouble, _
ByVal lclMa As DBDouble, _
ByVal uclMa As DBDouble, _
ByVal clMr As DBDouble, _
ByVal lclMr As DBDouble, _
ByVal uclMr As DBDouble, _
ByVal clMs As DBDouble, _
ByVal lclMs As DBDouble, _
ByVal uclMs As DBDouble, _
ByVal clP As DBDouble, _
ByVal lclP As DBDouble, _
ByVal uclP As DBDouble, _
ByVal clNp As DBDouble, _
ByVal lclNp As DBDouble, _
ByVal uclNp As DBDouble, _
ByVal clC As DBDouble, _
ByVal lclC As DBDouble, _
ByVal uclC As DBDouble, _
ByVal clU As DBDouble, _
ByVal lclU As DBDouble, _
ByVal uclU As DBDouble, _
ByVal fittest As DBInt, _
ByVal histCapabilitySigma As DBInt, _
ByVal filterByEntId As Nullable(Of Boolean), _
ByVal filterByItemId As Nullable(Of Boolean), _
ByVal filterByWoId As Nullable(Of Boolean), _
ByVal filterByOperId As Nullable(Of Boolean), _
ByVal filterByProcessId As Nullable(Of Boolean), _
ByVal filterBySegmentReqId As Nullable(Of Boolean), _
ByVal filterBySegmentRespId As Nullable(Of Boolean), _
ByVal filterBySpare1 As Nullable(Of Boolean), _
ByVal filterBySpare2 As Nullable(Of Boolean), _
ByVal filterBySpare3 As Nullable(Of Boolean), _
ByVal filterBySpare4 As Nullable(Of Boolean), _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Date, _
ByRef charId As Integer _
)
'Usage
Dim sessionId As Integer
Dim charName As String
Dim charDesc As DBString
Dim type As Nullable(Of Integer)
Dim uomId As Integer
Dim severityCd As Nullable(Of Integer)
Dim defaultChart As Nullable(Of Integer)
Dim automatedColl As Nullable(Of Boolean)
Dim timeInterval As DBInt
Dim timeIntUnit As DBInt
Dim numberDecimals As Nullable(Of Integer)
Dim sampleSizeSource As DBInt
Dim normalSampleSize As Nullable(Of Integer)
Dim minimumSampleSize As Nullable(Of Integer)
Dim maximumSampleSize As DBInt
Dim numberDefectOpp As DBInt
Dim movAvgSpan As DBInt
Dim sigmaEst As DBInt
Dim trendLimits As Nullable(Of Boolean)
Dim useStdErr As Nullable(Of Boolean)
Dim clSource As DBInt
Dim samplesForCl As DBInt
Dim samplesBeforeCl As Nullable(Of Integer)
Dim stdAvg As DBDouble
Dim stdAvgIsTarget As Nullable(Of Boolean)
Dim stdDeviation As DBDouble
Dim clXbar As DBDouble
Dim lclXbar As DBDouble
Dim uclXbar As DBDouble
Dim clRange As DBDouble
Dim lclRange As DBDouble
Dim uclRange As DBDouble
Dim clSigma As DBDouble
Dim lclSigma As DBDouble
Dim uclSigma As DBDouble
Dim clIx As DBDouble
Dim lclIx As DBDouble
Dim uclIx As DBDouble
Dim clImr As DBDouble
Dim lclImr As DBDouble
Dim uclImr As DBDouble
Dim clMa As DBDouble
Dim lclMa As DBDouble
Dim uclMa As DBDouble
Dim clMr As DBDouble
Dim lclMr As DBDouble
Dim uclMr As DBDouble
Dim clMs As DBDouble
Dim lclMs As DBDouble
Dim uclMs As DBDouble
Dim clP As DBDouble
Dim lclP As DBDouble
Dim uclP As DBDouble
Dim clNp As DBDouble
Dim lclNp As DBDouble
Dim uclNp As DBDouble
Dim clC As DBDouble
Dim lclC As DBDouble
Dim uclC As DBDouble
Dim clU As DBDouble
Dim lclU As DBDouble
Dim uclU As DBDouble
Dim fittest As DBInt
Dim histCapabilitySigma As DBInt
Dim filterByEntId As Nullable(Of Boolean)
Dim filterByItemId As Nullable(Of Boolean)
Dim filterByWoId As Nullable(Of Boolean)
Dim filterByOperId As Nullable(Of Boolean)
Dim filterByProcessId As Nullable(Of Boolean)
Dim filterBySegmentReqId As Nullable(Of Boolean)
Dim filterBySegmentRespId As Nullable(Of Boolean)
Dim filterBySpare1 As Nullable(Of Boolean)
Dim filterBySpare2 As Nullable(Of Boolean)
Dim filterBySpare3 As Nullable(Of Boolean)
Dim filterBySpare4 As Nullable(Of Boolean)
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Date
Dim charId As Integer
Characteristic.Add(sessionId, charName, charDesc, type, uomId, severityCd, defaultChart, automatedColl, timeInterval, timeIntUnit, numberDecimals, sampleSizeSource, normalSampleSize, minimumSampleSize, maximumSampleSize, numberDefectOpp, movAvgSpan, sigmaEst, trendLimits, useStdErr, clSource, samplesForCl, samplesBeforeCl, stdAvg, stdAvgIsTarget, stdDeviation, clXbar, lclXbar, uclXbar, clRange, lclRange, uclRange, clSigma, lclSigma, uclSigma, clIx, lclIx, uclIx, clImr, lclImr, uclImr, clMa, lclMa, uclMa, clMr, lclMr, uclMr, clMs, lclMs, uclMs, clP, lclP, uclP, clNp, lclNp, uclNp, clC, lclC, uclC, clU, lclU, uclU, fittest, histCapabilitySigma, filterByEntId, filterByItemId, filterByWoId, filterByOperId, filterByProcessId, filterBySegmentReqId, filterBySegmentRespId, filterBySpare1, filterBySpare2, filterBySpare3, filterBySpare4, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt, charId)
public static void Add(
int sessionId,
string charName,
DBString charDesc,
Nullable<int> type,
int uomId,
Nullable<int> severityCd,
Nullable<int> defaultChart,
Nullable<bool> automatedColl,
DBInt timeInterval,
DBInt timeIntUnit,
Nullable<int> numberDecimals,
DBInt sampleSizeSource,
Nullable<int> normalSampleSize,
Nullable<int> minimumSampleSize,
DBInt maximumSampleSize,
DBInt numberDefectOpp,
DBInt movAvgSpan,
DBInt sigmaEst,
Nullable<bool> trendLimits,
Nullable<bool> useStdErr,
DBInt clSource,
DBInt samplesForCl,
Nullable<int> samplesBeforeCl,
DBDouble stdAvg,
Nullable<bool> stdAvgIsTarget,
DBDouble stdDeviation,
DBDouble clXbar,
DBDouble lclXbar,
DBDouble uclXbar,
DBDouble clRange,
DBDouble lclRange,
DBDouble uclRange,
DBDouble clSigma,
DBDouble lclSigma,
DBDouble uclSigma,
DBDouble clIx,
DBDouble lclIx,
DBDouble uclIx,
DBDouble clImr,
DBDouble lclImr,
DBDouble uclImr,
DBDouble clMa,
DBDouble lclMa,
DBDouble uclMa,
DBDouble clMr,
DBDouble lclMr,
DBDouble uclMr,
DBDouble clMs,
DBDouble lclMs,
DBDouble uclMs,
DBDouble clP,
DBDouble lclP,
DBDouble uclP,
DBDouble clNp,
DBDouble lclNp,
DBDouble uclNp,
DBDouble clC,
DBDouble lclC,
DBDouble uclC,
DBDouble clU,
DBDouble lclU,
DBDouble uclU,
DBInt fittest,
DBInt histCapabilitySigma,
Nullable<bool> filterByEntId,
Nullable<bool> filterByItemId,
Nullable<bool> filterByWoId,
Nullable<bool> filterByOperId,
Nullable<bool> filterByProcessId,
Nullable<bool> filterBySegmentReqId,
Nullable<bool> filterBySegmentRespId,
Nullable<bool> filterBySpare1,
Nullable<bool> filterBySpare2,
Nullable<bool> filterBySpare3,
Nullable<bool> filterBySpare4,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
out DateTime lastEditAt,
out int charId
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- charName
- Required. Holds the unique name of the characteristic for display.
- charDesc
- Optional. Holds the description of the characteristic.
- type
- Required. Holds the type of the characteristic. 0 (default) = variable, 1 = binary attribute, 2 = counted attribute
- uomId
- Required. Holds the unit of measure for the characteristic.
- severityCd
- Required. Holds the severity of the characteristic. 0 = Unused (not available for data entry), 1 = Not Monitored (run rule violations not checked), 2 = Non-Key (Default), 3 = Key, 4 = Critical
- defaultChart
- Optional. Holds the default_chart of the characteristic. 2 = Xbar + Range, 3 = Xbar + Sigma, 5 (default) = IX + MR, 7 = MA + Range, 8 = MA + Sigma, 16 = p, 17 = np, 18 = u, 19 = c, 20 = DPMO (coding per QI Analyst)
- automatedColl
- Optional. Holds the automated_coll value which flags if this characteristic can be collected automatically. Default = no
- timeInterval
- Optional. Holds the interval between the measurements. If sample size > 1 and automated_coll is Yes, the interval between measurements. Note this is a default for the characteristic, which can be overridden independently at each SRO.
- timeIntUnit
- Optional. Holds the units of time_interval. 0 = seconds, 1 = minutes, 2 = hours
- numberDecimals
- Optional. Holds the number of decimals which are displayed. Default = 0.
- sampleSizeSource
- Optional. Holds the source of the sample size. If type = 1 (attribute) 0 = fixed (default), 1 = entered, 2 = entered but copied from the previous value
- normalSampleSize
- Optional. Holds the normal number of measurements in a sample. If variable or attribute with fixed sample size, the normal number of measurements in a sample. If variable and normal_sample_size = 1, then data is not grouped. Default = 1
- minimumSampleSize
- Optional. Holds the minimum number of measurements in a sample. default = 1
- maximumSampleSize
- Optional. Holds the maximum number of measurements in a sample.
- numberDefectOpp
- Optional. Holds the number of defect opportunities per piece for counted attribute.
- movAvgSpan
- Optional. Holds the number of subgroups to average for moving average charts.
- sigmaEst
- Optional. Holds the sigma estimate. If variable, 0 = use tables, 1 = use std. dev.
- trendLimits
- Optional. Holds the trend limits. If variable, trend x-bar and IX limits Default = yes
- useStdErr
- Optional. Holds the standard error of regression. If trend_llimits = yes, use standard error of regression as sigma estimate Default = no
- clSource
- Optional. Holds the control limit source. 0 = automatically calculate from data (default). 1 = compute from standard mean and standard deviation values (if variable) or compute from standard p, np average proportion and standard c, u average number per unit values (if attribute). 2 = use preset values.
- samplesForCl
- Optional. Holds the number of samples to use for the calculation of control limits. If cl_source = 0, the number of samples to use for the calculation of control limits. 0 (default) = use all
- samplesBeforeCl
- Optional. Holds the number of samples required before control limits are calculated. If cl_source = 0, the number of samples that must be measured before control limits are calculated. Default = 1
- stdAvg
- Optional. Holds the standard average value. If cl_source = 1 and type is variable this is the standard mean; if type is binary attribute this is the standard p, np average proportion value; if type is counted attribute this is the standard c, u average number per unit value.
- stdAvgIsTarget
- Optional. Holds the flag whether to use the target instead of the std_avg value as the standard. If cl_source = 1, Default = yes
- stdDeviation
- Optional. Holds the standard deviation value. If variable and cl_source = 1, the standard deviation value.
- clXbar
- Optional. Holds the center line for xbar chart. If variable and cl_source = 2, center line for xbar.
- lclXbar
- Optional. Holds the lower control limit for xbar chart. If variable and cl_source = 2, lower control limit for xbar
- uclXbar
- Optional. Holds the upper control limit for xbar chart. If variable and cl_source = 2, upper control limit for xbar
- clRange
- Optional. Holds the center line for range. If variable and cl_source = 2, center line for range
- lclRange
- Optional. Holds the lower control limit for range. If variable and cl_source = 2, lower control limit for range
- uclRange
- Optional. Holds the upper control limit for range. If variable and cl_source = 2, upper control limit for range
- clSigma
- Optional. Holds the center line for sigma. If variable and cl_source = 2, center line for sigma
- lclSigma
- Optional. Holds the lower control limit for sigma. If variable and cl_source = 2, lower control limit for sigma
- uclSigma
- Optional. Holds the upper control limit for sigma. If variable and cl_source = 2, upper control limit for sigma
- clIx
- Optional. Holds the center line for individual x. If variable and cl_source = 2, center line for individual x
- lclIx
- Optional. Holds the lower control limit for individual x. If variable and cl_source = 2, lower control limit for individual x
- uclIx
- Optional. Holds the upper control limit for individual x. If variable and cl_source = 2, upper control limit for individual x
- clImr
- Optional. Holds the center line for individual moving range. If variable and cl_source = 2, center line for individual moving range
- lclImr
- Optional. Holds the lower control limit for individual moving range. If variable and cl_source = 2, lower control limit for individual moving range
- uclImr
- Optional. Holds the upper control limit for individual moving range. If variable and cl_source = 2, upper control limit for individual moving range
- clMa
- Optional. Holds the center line for moving average. If variable and cl_source = 2, center line for moving average
- lclMa
- Optional. Holds the lower control limit for moving average. If variable and cl_source = 2, lower control limit for moving average
- uclMa
- Optional. Holds the upper control limit for moving average. If variable and cl_source = 2, upper control limit for moving average
- clMr
- Optional. Holds the center line for moving range. If variable and cl_source = 2, center line for moving range
- lclMr
- Optional. Holds the lower control limit for moving range. If variable and cl_source = 2, lower control limit for moving range
- uclMr
- Optional. Holds the upper control limit for moving range. If variable and cl_source = 2, upper control limit for moving range
- clMs
- Optional. Holds the center line for moving sigma. If variable and cl_source = 2, center line for moving sigma
- lclMs
- Optional. Holds the lower control limit for moving sigma If variable and cl_source = 2, lower control limit for moving sigma
- uclMs
- Optional. Holds the upper control limit for moving sigma. If variable and cl_source = 2, upper control limit for moving sigma
- clP
- Optional. Holds the center line for p. If attribute and cl_source = 2, center line for p
- lclP
- Optional. Holds the lower control limit for p. If attribute and cl_source = 2, lower control limit for p
- uclP
- Optional. Holds the upper control limit for p. If attribute and cl_source = 2, upper control limit for p
- clNp
- Optional. Holds the center line for np. If attribute and cl_source = 2, center line for np
- lclNp
- Optional. Holds the lower control limit for np. If attribute and cl_source = 2, lower control limit for np
- uclNp
- Optional. Holds the upper control limit for np. If attribute and cl_source = 2, upper control limit for np
- clC
- Optional. Holds the center line for c. If attribute and cl_source = 2, center line for c
- lclC
- Optional. Holds the lower control limit for c. If attribute and cl_source = 2, lower control limit for c
- uclC
- Optional. Holds the upper control limit for c. If attribute and cl_source = 2, upper control limit for c
- clU
- Optional. Holds the center line for u. If attribute and cl_source = 2, center line for u
- lclU
- Optional. Holds the lower control limit for u. If attribute and cl_source = 2, lower control limit for u
- uclU
- Optional. Holds the upper control limit for u. If attribute and cl_source = 2, upper control limit for u
- fittest
- Optional. Holds the test to use for a goodness of fit. If variable, test to use for goodness of fit 0 = Shapiro-Wilk, 1 = Kolmogorov-Smirnov, 2 = Chi-Square, 3 = none
- histCapabilitySigma
- Optional. Holds the Hist capability Sigma. 0 = estimate using R-Bar, 1 = estimate using S-Bar, 2 = use within-group variation
- filterByEntId
- Optional. Holds the flag whether the default dataset be limited by ent_id of current/last sample even if qm_spec has null ent_id. Default = No
- filterByItemId
- Optional. Holds the flag whether the default dataset be limited by item_id of current/last sample even if qm_spec has null item_id, item_class_id, and parent_item_class_id. Default = No
- filterByWoId
- Optional. Holds the flag whether the default dataset be limited by wo_id of current/last sample. Default = No
- filterByOperId
- Optional. Holds the flag whether the default dataset be limited by oper_id of current/last sample even if qm_spec has null oper_id. Default = No
- filterByProcessId
- Optional. Holds the flag whether the default dataset be limited by process_id of current/last sample. Default = No
- filterBySegmentReqId
- Optional. Holds the flag whether the default dataset be limited by segment_requirement_id of current/last sample. Default = No
- filterBySegmentRespId
- Optional. Holds the flag whether the default dataset be limited by segment_response_id of current/last sample. Default = No
- filterBySpare1
- Optional. Holds the flag whether the default dataset be limited by the values in the spare1 field of current/last sample. Default = No
- filterBySpare2
- Optional. Holds the flag whether the default dataset be limited by the values in the spare2 field of current/last sample. Default = No
- filterBySpare3
- Optional. Holds the flag whether the default dataset be limited by the values in the spare3 field of current/last sample. Default = No
- filterBySpare4
- Optional. Holds the flag whether the default dataset be limited by the values in the spare4 field of current/last sample. Default = No
- spare1
- Optional. Holds the contents of the user-defined spare1 field.
- spare2
- Optional. Holds the contents of the user-defined spare2 field.
- spare3
- Optional. Holds the contents of the user-defined spare3 field.
- spare4
- Optional. Holds the contents of the user-defined spare4 field.
- lastEditComment
- Optional. Holds the new comment that describes why this record is being updated.
- lastEditAt
- Out parameter. Holds the datetime that this record was added.
- charId
- Out parameter. Holds the ID assigned to this record when it is added. The charId parameter is used by other methods that modify or delete this type of record.
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Optional non-DB* parameters: Either enter a value or pass a null. If passing a null and a default value has been defined, the default value will be used for the parameter.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null).
- Optional DB* parameters: To enter no value for the parameter, pass DB*.null (e.g., DBInt.null). To use the default value for the parameter if one has been defined for the object being added, pass a null.