Home : STI
Q11328 - INFO: STI

STI returns sample information for a SampleNum/SampleId and/or TestId/TestName

SYNTAX:

STI(ID/SampleNum,TestNum/TestName,Field)

ID/SampleNum:  The SampleID or SampleNum to identify the Lab Cal Sample.

TestNum/TestName: Idenifies the test to return info for.  If it is a number, function will order the tests in the sample by TestId and return info on the TestNum row of the ordered list. 

Field: The field in the Sample table (LC_SAMPLE)  or SampleTest Table (LC_SAMPLETEST) to return.  Common fields:

ID
SAMPLENUM
SAMPLENAME
ANALYZEDBY
ANALYZED_DATETIME
RECEIVED_DATETIME
RECEIVEDBY
SAMPLEDBY(ID)
SAMPLEDBY
ASSIGNEDTO
LOCATION
LOCATION_PATH
SAMPLETYPE
DATECOLLECTIONDUE
SAMPLEDTTIME
RECEIVEDBY,RCVDBY - Received in Lab By (person)
RECEIVED_DATETIME - Received in Lab Date/time
SAMPLEVOLUME
VARID
VARNUM
TESTID
TESTNAME
RESULT
TEXTVALUE
RESULTCOMMENT
NOTES - Sample Notes/Comments
LAB
LABID
SAMPLEUD1..SAMPLEUD5
TEST.VOLANALYZED
TEST.DESCRIPTION
TEST.STORETCODE
TEST.COST
TEST.MDL
TEST.RL
TEST.SIGFIGS
TEST.CASNO
TEST.ACRONYM
TEST.BASIS
TEST.ANALYTECODE
TEST.UD1..TEST.UD5
METHOD or METHOD.NAME - Method name
METHOD.ID or METHODID
METHOD.METHODDESC
METHOD.METHODTYPE
METHOD.METHODPROC
METHOD.METHODGROUP
METHOD.METHODACRONYM
CLIENT
CLIENT.ADDRESS1
CLIENT.ADDRESS2
CLIENT.STATE
CLIENT.ZIP
CLIENT.CONTACTNAME
CLIENT.PHONE
CLIENT.EMAIL
PARENT.SAMPLENUM..PARENT.SAMPLEUD5 - Get information from Parent Sample. 
VARDESC.UNITS, UNITS, VARID, VARNUM, VARDESC.NAME, VARDESC.SHORTNAME, VARDESC.ENTRYMIN, VARDESC.ENTRYMAX, VARDESC.UD1..VARDESC.UD9

EXAMPLES:

STI("080603-0001",1,"TESTNAME") - returns the testname of the first test for the sample 080603-0001.

STI("080603-0001","Total Coliform","ANALYZEDBY") - Returns the Name of the person who performed the Total Coliform test on the sample. 

STI("080603-0001",1,"SAMPLENAME") - returns the Sample Name of the sample for the sample 080603-0001.  TestNum is ignored since it is not needed to return the sample name. 

STI("180213-0002",1,"PARENT.SAMPLENUM") - returns the Sample Number ("180212-0005") from the parent sample set on the Associated Samples tab:.

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 6/5/2008 1:56 PM.
Last Modified on 7/19/2019 1:17 PM.
Last Modified by Scott Dorner.
Article has been viewed 1547 times.
Rated 8 out of 10 based on 2 votes.
Print Article
Email Article