SRFL returns Sample Result information For a Variable and Location. Typically used with Ad hoc Samples.
SYNTAX:
SRFL(VarNum, Location Id/Location,Offset,DecPlaces,Field)
VarNum/Where Clause: Specifies the variable to get text value for. Can be a variable number, a cell reference to a variable number or a Variable WHERE Clause.
Location Id/Location: If a number specifies the Location Id for the location to report on, if it is a string it can specify the Location name or the full location path.
Offset: Sets which value to return. For example, a setting of 1 means return the 1st value found in the report dates, 2 means return the 2nd value found, etc…
Decimal Places: Number of decimal places to display the result to. ONLY used if the Field is blank or TextResult.
Field: The field in the Sample table (LC_SAMPLE) or SampleTest Table (LC_SAMPLETEST) to return. Common fields:
Sample Fields (LC_SAMPLE) |
Test/Analyte Fields (LC_SAMPLETEST) |
|
ID SAMPLENUM SAMPLENAME
LOCID
RECEIVED_DATETIME RECEIVEDBY SAMPLEDTTIME SAMPLEDBYNAME ASSIGNEDTO RECEIVEDBY,RCVDBY,RCVDBYNAME RECEIVED_DATETIME
LAB SAMPLEVOLUME SAMPLEUD1..SAMPLEUD9 NOTES - Sample Notes/Comments
TOTALCOST |
TESTNAME RESULT TEXTVALUE
STARTANALYST ANALYSIS_START, DATESTART
ANALYZEDBY ANALYZED_DATETIME,ANALYSIS_END,DATECOMPLETE METHODNAME |
|
EXAMPLES:
=SRFL(11226,243,1,2,"TEXTVALUE") - Get the 1st result for variable 11226 when the sample location is set to id 243.
=SRFL(11226,$C$2,1,2,"SAMPLENUM") - Cell C2 contains the location name "4020 Peggy St, Rio Rancho, NM 87144".
SEE ALSO: VSAMP , STI