Use Custom Function in Sample Naming Schema
Copyright © 2018 EarthSoft, Inc • Modified: 12 Dec 2018
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.
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:
2.Include Custom DB Function in the Sample Naming Schema. It can be the only item, or one of several items, as shown below.