Use Custom Function in Sample Naming Schema

<< Click to Display Table of Contents >>

EQuIS 7  >>  SPM > SPM Desktop > Tasks > Samples >

Use Custom Function in Sample Naming Schema

This feature allows a custom database table-valued function to be used in the building of the Sample ID. The Sample ID can then vary depending on other items such as sample type, matrix code, etc.

 

When the Custom DB Function is used in the Sample Naming Schema, SPM will call this function for each created sample, pass parameters to the rest of the Sample ID function, and generate a sample ID based on the configured items.

 

Edit the Custom DB Function

 

1.Modify the spm5.CUSTOM_SAMPLE_SCHEMA function found under SSMS / [your db] / Programmability / Functions / Table-value Functions to meet the design of the Sample ID desired. A knowledge of SQL Server Management Studio is recommended.

 

The following items may be used in the custom function:

 

facility_id

sys_loc_code

sample_type

sample_date

matrix_code

task_code

start_depth

end_depth

depth_unit

sampler

 

20082-CustomSampleSchema

 

2.Include Custom DB Function in the Sample Naming Schema. It can be the only item, or one of several items, as shown below.

 

20082-SampleNamingSchema