Bika lims id setup


Could I please get a little clarification of the different columns in the setup id formatting?
the first three columns I’m pretty sure I get. The last five I would like a little clarification on.
I’m trying to past a screen shot, but it’s not working.
The columns are portal type , format , seq type , context , counter type , counter ref , prefix , split length.
in edit setup id server
Things are really looking great on this project!



Very basic here Mark,

If you have time for more specific questions,please post, towards improvement of the texts, all suggestions

am also collecting UI tag and description improvements, one day soon


Hi @mgarner1980 I will try to clarify those columns, but is quite technical and complex:

If Sequence Type is “Generated”, the ID is constructed according to the configured “prefix” and “split length”. The split length defines where the variable part of the ID template begins. The prefix is the static part of the ID and if it is not defined, the system will use the portal_type name as prefix.

If Sequence Type is “Counter”, we use the length of the “backreferences” or “contained” objects of the evaluated “context” defined in the Setup (actually this is a difficult configuration). This “context” is defined by the user in Bika Setup and can be actually anything. However, we assume it is something like “sample” or similar. It is like a wildcard for programmers to give flexibility to ID Generation.

The ID Server machinery builds a dictionary (key:value), this “context” name must be a key of this dictionary, and the value can be whatever the programmer wishes.

By default, the systems does the following: if a user is creating an Analysis Request, the dictionary will have a key “sample”. The value for this key will be the Sample related to the Analysis Request.

This means that when the context field in setup is defined as ‘sample’, the system will use the sample related to the analysis request for something.

The counter type, which is either “backreference” or “contained”.

The counter reference is either the “relationship” for “backreference” or the meta type for “contained” objects.

A relationship is another technical concept… basically it relates a Sample to its Analysis Requests or Analysis, so from a Sample you can get the analysis request related to it.

“contained” means that the system will use the items inside an item to generate the number. For example, an Analysis Request contains Analyses.

Basically, context - counter type – counter ref are used to give a number to the sequence and gives programmer a lot of flexibility.

If you are looking for complex configuration you may ask for help to a provider or you can post the configuration you wishes and we will tell how to do it.


Thanks for the thorough and prompt response.
We most likely will keep it simple, but I know I’m going to get asked about the options.


Thanks for the information.