Column Widgets

Basic column type widgets

Overview

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

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

Basic widget to provide certain types of data.

Text

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

Number

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

Select

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.

MultiSelect

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.

Boolean

Use this widget to edit boolean value.

Secret

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.

Formula

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

Syntax

[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"

Operator

  • + 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 b

  • Substring: 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

ForeignKey

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

ForeignKey

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.

ForeignKeys

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

Member

A group of widgets to manage member related functions.

Member

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.

Members

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

MemberEmail

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

MemberEmails

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

DateTime

A group of widgets to handle date and time value.

Date

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

Time

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

DateTime

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

Appointment

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