Skip to content

Adding new Storage Equipment Types UI

Here are the steps required to add a new item type in LabID and customize it. For this example, we will deploy a new Storage Equipment type named Puck to store the TEM cryo-grids.

Add a new Type Store for the new Puck Storage Equipment

  • In the admin panel, go to Annotations > Type stores and click Add Type Store
  • Fill in the form:
  • Name = PUCK
  • Label = Puck
  • Content type = select stocks | storage equipment
  • do not select any Technologies
  • Order is a number governing the order in the storage menu, between 0 and 1000
    • Check the place where you want it, open the type stores (in another window) right before and after you'd like the Puck to be; and pick a number in between.

A Field Order stores which fields (built-in and custom) are shown on a type — and in which order — for both the detail view and the list view. The field order for the new Puck type is not created on save (generic Type Store entries do not get a field order automatically). It will be created lazily the first time you attach a Custom Property Type (CPT) to it (see next section) — the CPT save handler creates the field order if missing and appends the new property to it.

If you are not going to attach any Custom Property Type immediately, run the Reset field order on selected model types (cannot be undone!) action from Annotations > Type stores on the new type to create its field order right away.

Add a new custom integer property position_number

This property will reflect how many positions are available in the Puck.

  • In the admin panel, go to Annotations › CustomPropertyTypes and click Add Custom Property Type
  • The form is organised in sections. Fill them in top to bottom:

Field description

  • Name — the internal property name (never change this once used)
  • Label — the property label as it will appear on the UI
  • Description — clear explanation of what this property is; used as contextual help/tooltip

Applicable to (Custom Property Type only)

  • Model name — here stocks.storageequipment
  • Model type — here PUCK (the type store name from the previous step); leave empty to apply to all subtypes of the model

Field Meta

  • Field type — the unified type/widget selector (here Integer). The form auto-adjusts to show only the sub-options relevant to your choice (e.g. Unit default / Unit choices appear only for ... with Unit types, CV Category only for Vocabulary Term, Allowed object types only for Linked Object). See the full list of field types below.
  • Multiple — check if the property accepts multiple values
  • Choices — a limited set of choices for a text field, used when a CV Category would be overkill. Write a JSON list of [value, label] pairs, e.g. [["PRIMARY","Primary"],["SECONDARY","Secondary"]]. Combine with Field type = Text with Choices.
  • Validations — validation rules passed to the UI (JSON)
  • Mandatory — is this property mandatory
  • Readonly — is this property read-only in the UI
  • Default — a default value, or leave empty

Visibility

  • Visibility, Edit visibility, List visibility — decide when and where this property is displayed

Deprecated (collapsible)

  • Legacy flags (Inactive, Version, …). Only touch these when migrating an existing property.
The Custom Property Type admin form. Picking a Field type reveals only the sub-options relevant to that type.
Available Field type options

The unified Field type dropdown replaces the previous separate Type + Field meta selection. Available choices:

  • Free Text
  • Long Text (Textarea)
  • Text with Choices
  • Autocomplete Text
  • Number
  • Integer
  • Number with Unit
  • Integer with Unit
  • Decimal with Unit
  • Float with Unit
  • Integer Range
  • Float Range
  • Integer Range with Unit
  • Float Range with Unit
  • Vocabulary Term — requires a CV Category
  • Vocabulary Term with Picture — for CV terms with an associated logo (e.g. chemical hazards)
  • URL
  • PubMed ID
  • Linked User
  • Linked Object — requires selecting the Allowed object types
  • JSON

Add as many custom properties as needed. Each new property automatically appears in the field order for the target type.

Reorder or hide fields (optional)

Field order is generated automatically, but you can adjust it:

  • Toggle which properties are shown — open the type store and use the Customize Attributes panel to toggle which Custom Property Types appear in the detail and list views.
  • Reorder or edit the JSON directly — the same Customize Attributes panel exposes a FieldOrder #N link to the related field order's admin page. Follow that link to edit the JSON directly (reorder, add, or remove fields). Save only when the JSON is well formatted.

Displaying or hiding a custom property

The UI only shows an item's properties that are listed in the respective Field order. If an expected field is not visible, open the type store's Customize Attributes panel and check the linked FieldOrder: the field may be missing (e.g. spelling mismatch) or intentionally removed.

To hide a default property, remove it from the field order — this will hide the property for everyone.

Recovering a corrupt field order

The Reset field order on selected model types (cannot be undone!) action in Annotations > Type stores rebuilds the field order from the model's defaults plus every Custom Property Type (CPT) attached to the type. Use it as a recovery tool if a field order is broken — it is no longer required as part of the normal CPT-creation workflow.