Home : Products : Hach WIMS : Hach WIMS Client : Documentation : Function Reference : Spread Functions : BTI
Q14698 - INFO: BTI

BTI returns batch information for a BatchNum/BatchID and/or Batch Row.

SYNTAX:

BTI(ID/BatchNum,BatchRow,Field)

ID/BatchNum:  The BATCHID (LC_BATCH.ID) or Batch number (LC_BATCH.BATCHNUM) to identify the Lab Cal Batch.

BatchRow/STID: Identifies the row in the batch to return information for.  If parameter is text (i.e. in quotes or refers to a cell that is text), it specifies the LC_SAMPLETEST.STID that uniquely identifies the row in the batch. 

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

Batch Fields PrepBatch Fields Sample Fields Test/Analyte Fields Method Fields

BATCH.ID
BATCHNUM
BATCH.NAME
BATCH.STARTDATE
BATCH.ENDDATE
BATCH.STARTANALYST
BATCH.ENDANALYST

BATCH.NOTES
BATCH.STATUS

PREPBATCH.ID
PREPBATCHNUM
PREPBATCH.NAME
PREPBATCH.PREPDATE
PREPBATCH.ENDDATE
PREPBATCH.PREPBY
PREPBATCH.PREPBYID
PREPBATCH.METHOD
PREPBATCH.METHODID

PREPBATCH.NOTES
PREPBATCH.STATUS

ID
SAMPLENUM
SAMPLENAME

LOCID
LOCATION
LOCATION_PATH

DATECOLLECTIONDUE
ORIGDATEDUE - If rescheduled
RESCHEDULECOUNT - # of times rescheduled


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
RESULT.MDL
RESULT.RL

QCCALC
BATCHQCRESULT
BATCHQCFORMULA
BATCHRECTYPE

QCCALC.UNITS
QCCALC.VARID
QCCALC.VARNUM
QCCALC.NAME
QCCALC.ENTRYMIN
QCCALC.ENTRYMAX
QCCALC.UD1..UD9

TESTQC.NAME
TESTQC.SETVAL
TESTQC.QCCALCVARID
TESTQC.INPUTVARID
TESTQC.QCTYPE

ORIGSAMPLENUM*1
ORIGTEXTVALUE
ORIGCURVALUE

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

*1 - The Orig fields refer to the duplicated or spiked sample results. 

EXAMPLES:

=BTI("B220216-01",1,"SAMPLENUM") - Returns the sample name for the first (1) record/sample in the batch.  Note:  QC tests do not have an associated sample and therefore always return QC for the Sample number. 

=BTI("B220216-01",3,"RESULT") - Returns the result for the third (3) record/sample in the batch.  Note:  For QC tests this returns the entered result not the calculated QC value.  If you entered 22 for a 20 standard, you would get the 22 not the calculation of 110% recovery.  For normal samples returns the result for the test.   

=BTI(35,"11518","TESTNAME") - Returns the name of the Test (LC_TEST.NAME) for BATCHID 35 for STID 11518.  Since the TestNum/STID field is a string it is assumed to be the LC_SAMPLETEST.STID field. 

 

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 3/3/2022 4:47 PM.
Last Modified on 10/26/2023 4:34 PM.
Last Modified by Steve Fifer.
Article has been viewed 1494 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article