Skip to content

Example: New Storage Equipment Type 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

  • Go to Annotations > Type stores and 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.

Generate Field Order for the new Puck type

  • Go to Annotations > Type stores
  • Select the newly created Puck type, and use the Reset field order on selected model types (cannot be undone!). action

Add a new custom integer property position_number

this property will reflect how many position are available in the Puck

  • Go to Annotations › CustomPropertyTypes and click Add Custom Property Type
  • Fill in the form:
  • Name : the internal property name (never change this once used)
  • Description : provide clear explanation of what this property is. This will be used in contextual help
  • Label: the property label as it will appear on the UI
  • Type: the type of the property, here an Integer but notice all the other available type (see below)
  • Unit default & Unit choices must be indicated when selecting a property type ... with unit
  • Multiple: if the property accepts multiple values (e.g. controlled vocabulary)
  • Choices: A limited set of choices for a TEXT field, can be used if a CV Category is overkill.
    • Write a nested list in json e.g. [["PRIMARY","PRIMARY"],["SECONDARY","PRIMARY"]]
    • When used, please use Type = FreeText and Field meta = TEXTSELECT
  • Validations: validation to be passed to the UI
  • Cv category: required for Controlled Vocabulary Term property types
  • Mandatory: is this property mandatory
  • Default: a default value, or leave empty
  • Field meta: the UI component to use to render this property. Most are implied by the property Type, this shoudl be pretty obvious from the names
  • Model Name: here stocks.StorageEquipment
  • Model Type: here PUCK (ie the type store name as defined earlier)
  • Visibility, Edit Visibility, List Visibility: decide when this property is displayed
  • Modified by, Created by, Owner & Owned by group: as usual
Available Property Types and Field Meta

Here is the list of available property types:

  • Free Text
  • Date
  • Controlled Vocabulary Term: if selected, requires to define the Cv category
  • Float/Decimal/Integer
  • Float/Decimal/Integer with unit
  • Float/Decimal/Integer Range
  • Float/Decimal/Integer Range with unit
  • Link to any object
  • Linked to user
  • Object as json
  • PubmedID
  • Specific DMApp object
  • Specific Galaxy object

Here is the list of available field meta:

  • TEXT: renders a single line text
  • TEXTAREA: renders a multiline text
  • TEXTAUTOCOMPLETE: renders a text field that autocompletes on typing
  • TEXTSELECT: renders a field to select from text options
  • USERSELECT: renders a field to select a user
  • OBJECTSELECT: renders a field to select a object
  • PUBMEDID: renders a PUBMED Id as a link
  • VOCABULARYTERM: displays CV terms
  • VOCABULARYTERMPICTURE: displays CV terms that also have associated logo (eg chemical toxicity)
  • JSON: renders a JSON
  • RANGE: renders a range without unit
  • RANGEUNIT: renders a range with unit
  • DECIMALUNIT: renders a range of decimals with unit
  • FLOATUNIT: renders a range of floats with unit
  • NUMBERUNIT: renders a range of numbers with unit

Add as many custom properties as needed.

Generate Field Order for the new Puck type

If you haven't manually arranged the field order:

  • Go to Annotations > Type stores
  • Select the newly created Puck type, and use the Reset field order on selected model types (cannot be undone!). action

Then manually arrange the fields in your preferred order:

  • Go to Annotations > Field orders
  • Edit the field order:
  • Add the missing properties if necessary
  • rearrange the fields as you see fit

Make sure to have a well formatted JSON before saving

Displaying or or hiding a custom property

The UI only shows item's properties that are listed in the respective field order. In case an expected field is not visible, check the corresponding Field order: the field may be missing (e.g. you just added a custom property) or misspelled.

Similarly, if you d like to hide a default property, you can simply remove it from the field order, this will hide the property for everyone.

  • Go in the Annotations > Field orders
  • Locate the type store's field order to modify
  • directly change/add/remove the fields.