RecordResultData Method
- Last UpdatedMar 17, 2026
- 1 minute read
The RecordResultData() method adds one or more result values to the Result table and returns any control rule violations.
'Declaration
Public Shared Sub RecordResultData( _
ByVal sampleId As Integer, _
ByVal charName As String, _
ByVal createdBy As String, _
ByVal results() As ResultAttribute, _
ByRef controlRuleViolations As String _
)
public static void RecordResultData(
int sampleId,
string charName,
string createdBy,
ResultAttribute[] results,
out string controlRuleViolations
)
Parameters
- sampleId
- Required. Holds the sample ID.
- charName
- Required. Holds the characteristic name.
- createdBy
- Required. Holds the ID of the user who entered the values.
- results
- Required. Holds the list of result attributes.
- controlRuleViolations
- Output. Holds the string of control rule violations.
Following is an example System Platform scripting call using the RecordResultData() method.
Dim Result as aaMES.Result;
Dim ResultValue1 as Integer;
Dim ResultValue2 as Integer;
Dim SampleID as Integer;
Dim CharName as String;
Dim CreatedBy as String;
Dim ControlRuleViolations as String;
ResultValue1 = 101;
ResultValue2 = 102;
SampleID = 10;
CharName = "Weight";
CreatedBy = "Operator";
Dim ResultAttr[2] As aaMES.Quality.aaResultAttribute;
ResultAttr[1] = New aaMES.Quality.aaResultAttribute(1,ResultValue1);
ResultAttr[2] = New aaMES.Quality.aaResultAttribute(2,ResultValue2);
Result = aaMES.Quality.aaResult.RecordResultData( SampleID, CharName, CreatedBy, ResultAttr, ControlRuleViolations);