Basic column type widgets

**Column widgets** are used for defining and customizing structured data. They are similar to the data types in mysql, but are more powerful in that functions can be attached.

Labii ELN & LIMS currently provides these widgets:

Category | Widget | Type | Description |

â€‹Basicâ€‹ | â€‹Textâ€‹ | Column | Edit text value |

â€‹Basicâ€‹ | â€‹Numberâ€‹ | Column | Edit numeric value |

â€‹Basicâ€‹ | â€‹Selectâ€‹ | Column | Choose a value from a dropdown |

â€‹Basicâ€‹ | â€‹MultiSelectâ€‹ | Column | Choose multiple values from a dropdown |

â€‹Basicâ€‹ | â€‹Booleanâ€‹ | Column | Edit boolean value |

â€‹Basicâ€‹ | â€‹Secretâ€‹ | Column | Display sensitive value as * |

â€‹Basicâ€‹ | â€‹Formulaâ€‹ | Column | Display output of a formula |

â€‹Basicâ€‹ | â€‹Consumptionâ€‹ | Column | Display remaining volume |

â€‹ForeignKeyâ€‹ | â€‹ForeignKeyâ€‹ | Column | Link to one other record |

â€‹ForeignKeyâ€‹ | â€‹ForeignKeysâ€‹ | Column | Link to many other records |

â€‹Memberâ€‹ | â€‹Memberâ€‹ | Column | Choose of a member |

â€‹Memberâ€‹ | â€‹Membersâ€‹ | Column | Choose of many members |

â€‹Memberâ€‹ | â€‹MemberEmailâ€‹ | Column | Choose of a member with email notification |

â€‹Memberâ€‹ | â€‹MemberEmailsâ€‹ | Column | Choose of many members with email notification |

â€‹DateTimeâ€‹ | â€‹Dateâ€‹ | Column | Edit date value |

â€‹DateTimeâ€‹ | â€‹Timeâ€‹ | Column | Choose of a time |

â€‹DateTimeâ€‹ | â€‹DateTimeâ€‹ | Column | Combination of Date and Time |

â€‹DateTimeâ€‹ | â€‹Appointmentâ€‹ | Column | Add DateTime to Calendar |

Basic widget to provide certain types of data.

Use this widget to edit text value. There is no length limit on how much text you can provide.

â€‹â€‹â€‹

Use this widget to edit numeric value. The value can be positive (+), negative (-), integer, or float.

â€‹â€‹â€‹

Use this widget to choose a value from dropdown list. The items of dropdown list are defined in the default value field of column settings. The widget can be used for controlled vocabulary.

â€‹â€‹â€‹

Use `___`

to separate value and label of a dropdown item. For example, if an item has value of "#000", and you want to label it as "Black", you can set "#000___Black" in the default value field.

Use this widget to choose multiple values from dropdown list. It is identical to Select widget except that more than one value can be selected.

â€‹â€‹â€‹

Use this widget to edit boolean value.

â€‹â€‹â€‹

Use this widget to hide sensitive data. The value will be displayed as "****". Use it for password or salary, etc.

â€‹â€‹â€‹

To display the hidden value, click "view" icon to display.

â€‹â€‹

Use this widget to display value calculated based on a formula. The formula shall be defined in the **Default Value** of the column.

â€‹â€‹

â€‹â€‹

`[Field 1] + [Field 2]`

Wheres, **Field** is the **sid** of a column. For example

`[8adg0a40x52520ejotyDI] + [69be0a40x52508chmrwBG]`

`[8adg0a40x52520ejotyDI].substring(1,2)`

`[8adg0a40x52520ejotyDI].substring(1,3) == "ATCG" ? "Good" : "Bad"`

+ Addition,

`a + b`

- Subtraction,

* Multiplication

** Exponentiation (ES2016)

/ Division

% Modulus (Remainder)

Priority calculate with

`()`

is supported,`(100 + 50) * a;`

If condition:

`true ? a : b`

, if the condition is true, then return a, else, return bSubstring:

`string.substring(start, end)`

Case:

Upper:

**str.toUpperCase()**Lower:

**str.toLowerCase()**

Date:

`new Date(dateString)`

, learn more at here.â€‹Math:

abs(x) Returns the absolute value of x

acos(x) Returns the arccosine of x, in radians

asin(x) Returns the arcsine of x, in radians

atan(x) Returns the arctangent of x as a numeric value between -PI/2 and PI/2 radians

atan2(y, x) Returns the arctangent of the quotient of its arguments

ceil(x) Returns the value of x rounded up to its nearest integer

cos(x) Returns the cosine of x (x is in radians)

exp(x) Returns the value of Ex

floor(x) Returns the value of x rounded down to its nearest integer

log(x) Returns the natural logarithm (base E) of x

max(x, y, z, ..., n) Returns the number with the highest value

min(x, y, z, ..., n) Returns the number with the lowest value

pow(x, y) Returns the value of x to the power of y

random() Returns a random number between 0 and 1

round(x) Returns the value of x rounded to its nearest integer

sin(x) Returns the sine of x (x is in radians)

sqrt(x) Returns the square root of x

tan(x) Returns the tangent of an angle

Use this widget to display the remaining volume of a sample or reagent.

**Requirements**:

Column "

**Volume Value**" with Number widgetTable "

**Consumption**"Column "

**Sample**" or "**Reagent**" with ForeignKey widgetColumn "

**Amount**" with Number widget

**Default Value:**

The consumption widget requires JSON format default values as below:

**volume_value__sid**- the sid of the column "**Volume Value**"**consumption_sample__sid**- the sid of the column "**Sample**" or "**Reagent**" from the consumption table**consumption_amount__sid**- the sid of the column "**Amount**" from the consumption table**threshold**- the color of the value will turn red if remaining value lower than the threshold

{"volume_value__sid":"RUX10a40x94dcTY49dins","consumption_sample__sid":"KNQT0a40x94d5MRW27bgl","consumption_amount__sid":"MPSV0a40x94d7OTY49din","threshold":10}

â€‹â€‹â€‹

Use `{"is_low":true}`

to create filters that have low volume samples.

ForeignKey is a group of widgets to link one record with one or many other records.

â€‹

Use this widget to link to one other record. The linked record is clickable.

â€‹â€‹â€‹

To limit the link to a particular table, use

**Unique Code**in the widget default value. For example, "EP" with limit the widget to only search experiments.To limit the link to one or more tables. Add multiple unique code separated with ",". For example, "EP,SP".

The widget is searchable. If you did not find the record you want, type in keywords in the top of dropdown. Currently, the search only goes to the name of a record.

Use this widget to link to many other records. The usage is same to ForeignKey.

â€‹â€‹â€‹

A group of widgets to manage member related functions.

Use this widget to choose a member. Use this widget to assign task to a member.

â€‹â€‹â€‹

Only active member is choosable.

The widget is searchable. If you did not find the member you want, type in name in the top of dropdown.

Use this widget to choose multiple members. The usage is save to Member widget.

â€‹â€‹â€‹

Use this widget to choose a member. It is same as Member widget except it will send an email notification to the member.

â€‹â€‹â€‹

Use this widget to choose multiple members. It is same as Members widget except it will send an email notification to all selected members.

â€‹â€‹â€‹

A group of widgets to handle date and time value.

Use this widget to edit date value. A date picker is provided to select date.

â€‹â€‹â€‹

Use this widget to pick a time. Currently, Labii supports time in 30-min intervals.

â€‹â€‹â€‹

Use this widget to pick a date and time. This widget is the combination of Date and Time widget.

â€‹â€‹â€‹

Use this widget to set appointment and add the appointment calendar. Currently Google calendar is supported.

â€‹â€‹â€‹