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:

Sample Fields Test/Analyte Fields Method Fields

ID
SAMPLENUM
SAMPLENAME

LOCID
LOCATION
LOCATION_PATH

RECEIVED_DATETIME
RECEIVEDBY
SAMPLEDTTIME
SAMPLEDBY(ID)
SAMPLEDBY
ASSIGNEDTO
RECEIVEDBY,RCVDBY RECEIVED_DATETIME

SAMPLESTATUS
SAMPLESTATUSDESC

REJECTIONCODE
REJECTIONCODE.DESCRIPTION

LAB
LABID
SAMPLEVOLUME
SAMPLEUD1..SAMPLEUD9
NOTES - Sample Notes/Comments

TOTALCOST
MISCCOST
SAMPLECOST
PREPCOST
PICKUPCOST
PREPCOST
TOTALTESTCOST
DISCOUNT
TAXRATE
PAYMENT
PAYMENTTYPE
PAYMENTNOTES

SAMPLEDEF.DESCRIPTION
SAMPLEDEF.NOTES
SAMPLEDEF.UD1..SAMPLEDEF.UD9
SAMPLEDEF.LABID
SAMPLEDEF.COLLECTIONTIME

VARID
VARNUM
TESTID
TESTNAME
RESULT
TEXTVALUE
RESULTCOMMENT

STARTANALYST
ANALYSIS_START, DATESTART

ANALYZEDBY
ANALYZED_DATETIME,ANALYSIS_END
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.ID or METHODID
METHOD.METHODDESC
METHOD.METHODTYPE
METHOD.METHODPROC
METHOD.METHODGROUP
METHOD.METHODACRONYM

Location Fields VarDesc Fields Client Fields SampleType Fields

LOCID
LOCATION
LOCATION_PATH

LOCATION.PARENTID
LOCATION.DESCRIPTION
LOCATION.PERMITNUMBER
LOCATION.PERMITSTARTDATE
LOCATION.PERMITENDDATE

LOCATION.PWSID
LOCATION.WSFID
LOCATION.SAMP_POINT_ID

LOCATION.LVL1_ID..LVL8_ID
LOCATION.SITEADDRESS
LOCATION.SITESTATE
LOCATION.SITECITY
LOCATION.SITEZIP
LOCATION.SITECOUNTRY
LOCATION.SITECONTACT
LOCATION.SITEEMAIL
LOCATION.SITEPHONE

LOCATION.MAILADDRESS
LOCATION.MAILSTATE
LOCATION.MAILCITY
LOCATION.MAILZIP
LOCATION.MAILCOUNTRY
LOCATION.MAILCONTACT
LOCATION.MAILEMAIL
LOCATION.MAILPHONE

LOCATION.NAICS_SIC1
LOCATION.NAICS_SIC2
LOCATION.LEGALDESC
LOCATION.UD1-UD9

VARNUM
VARID
VARDESC.NAME
VARDESC.UNITS, UNITS
VARDESC.SHORTNAME
VARDESC.ENTRYMIN
VARDESC.ENTRYMAX
VARDESC.UD1..VARDESC.UD9

CLIENT
CLIENT.ADDRESS1
CLIENT.ADDRESS2
CLIENT.STATE
CLIENT.ZIP
CLIENT.CONTACTNAME
CLIENT.PHONE
CLIENT.EMAIL

SAMPLETYPE
SAMPLETYPE.DESCRIPTION
SAMPLETYPE.UD1-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 3/20/2020 3:41 PM.
Last Modified by Scott Dorner.
Article has been viewed 1892 times.
Rated 8 out of 10 based on 2 votes.
Print Article
Email Article