S-${genId}
S-1
S-2
S-3
and so on...
Name Element | Description | Scope0000000000000000000000000 |
---|---|---|
genId | An incrementing number starting from 1. This counter is specific to the individual Sample Type or Data Class. | Current Sample Type / Data Class |
dailySampleCount | An incrementing counter, starting with the integer '1', that resets each day. | All Sample Types across the entire server |
weeklySampleCount | An incrementing counter, starting with the integer '1', that resets each week. | All Sample Types across the entire server |
monthlySampleCount | An incrementing counter, starting with the integer '1', that resets each month. | All Sample Types across the entire server |
yearlySampleCount | An incrementing counter, starting with the integer '1', that resets each year. | All Sample Types across the entire server |
randomId | A four digit random number for each sample row. | Current Sample Type / Data Class |
batchRandomId | A four digit random number applied to the entire set of incoming sample records. On each import event, this random batch number will be regenerated. | Current Sample Type / Data Class |
now | The current date, which you can format using string String Expression Format Functions. | Current Sample Type / Data Class |
Inputs | A collection of all DataInputs and MaterialInputs for the current sample. You can concatenate using one or more value from the collection. | Current Sample Type / Data Class |
DataInputs | A collection of all DataInputs for the current sample. You can concatenate using one or more value from the collection. | Current Sample Type / Data Class |
MaterialInputs | A collection of all MaterialInputs for the current sample. You can concatenate using one or more value from the collection. | Current Sample Type / Data Class |
<SomeDataColumn> | Loads data from some field in the data being imported. For example, if the data being imported has a column named "SampleType", use the element/token "${SampleType}" | Current Sample Type / Data Class |
${ColumnName:defaultValue('value')}
Name Expression | Example Output | Description |
---|---|---|
S-${genId} | S-101 S-102 S-103 S-104 | S- + a simple sequence |
${Lab:defaultValue('Unknown')}_${genId} | Hanson_1 Hanson_2 Krouse_3 Unknown_4 | The originating Lab + a simple sequence. If the Lab value is null, then use the string 'Unknown'. |
S_${randomId} | S_3294 S_1649 S_9573 S_8843 | S_ + random numbers |
S_${now:date}_${dailySampleCount} | S_20170202_1 S_20170202_2 S_20170202_3 S_20170202_4 | S_ + the current date + daily resetting incrementing integer |
S_${drawDate:format('LLLyyyy')}_${drawDate:monthlySampleCount:number('0000')} | S_Feb2017_0001 S_Feb2017_0002 | S_ + the draw date month + year + monthly incrementing counter zero padded |
S_${Column1}_${Column2} | S_Blood_PT101 | Create an id from the letter 'S' and two values from the current row of data, separated by underscore characters. |
Name Expression00000000000000000000000000000000000000000000000 | Example Output000000000000000000 | Description |
---|---|---|
S-${Column1}-${now:date}-${batchRandomId} | S-Blood-20170103-9001 | |
S-${Column1:suffix('-')}${Column2:suffix('-')}${batchRandomId} | S-Blood-PT101-5862 | |
${Column1:defaultValue('S')}-${now:date('yy-MM-dd')}-${randomId} | Blood-17-01-03-2370 S-17-01-03-1166 | ${Column1:defaultValue('S')} means 'Use the value of Column1, but if that is null, then use the default: the letter S' |
${DataInputs:first:defaultValue('S')}-${Column1} | Nucleotide1-5 S-6 | ${DataInputs:first:defaultValue('S')} means 'Use the first DataInput value, but if that is null, use the default: the letter S' |
${DataInputs:join('_'):defaultValue('S')}-${Column1} | Nucleotide1_Nucleotide2-1 | ${DataInputs:join('_'):defaultValue('S')} means 'Join together all of the DataInputs separated by undescores, but if that is null, then use the default: the letter S' |
Name (from expression) | Lot | SampleInLot | Plate Id |
---|---|---|---|
S-A-1 | A | 1 | P1234 |
S-A-2 | A | 2 | P1234 |
S-B-1 | B | 1 | P1234 |
S-B-2 | B | 2 | P1234 |
<tables xmlns="http://labkey.org/data/xml">
<table tableName="MySampType" tableDbType="NOT_IN_DB">
<javaCustomizer class="org.labkey.experiment.api.CountOfUniqueValueTableCustomizer">
<properties>
<property name="counterName">SampleCounter</property>
<property name="counterType">org.labkey.api.data.UniqueValueCounterDefinition</property>
<!-- one or more pairedColumns used to derive the unique value -->
<property name="pairedColumn">Lot</property>
<!-- one or more attachedColumns where the incrementing counter value is placed -->
<property name="attachedColumn">SampleInLot</property>
</properties>
</javaCustomizer>
</table>
</tables>