Variables

Variables are the terms employed to substitute specific values within the parameters.

Overview

Labii variables serve as placeholders used to replace specific values within parameters, offering a dynamic and adaptable approach to data management and customization. These variables enable the convenient substitution of particular values with placeholders, streamlining processes and facilitating the automation of repetitive tasks within the Labii platform. By employing variables, users can create templates or configurations that accommodate various scenarios, allowing for swift adjustments and efficient handling of diverse data sets without the need for manual reconfiguration. This versatility empowers users to create more flexible and responsive systems, enhancing productivity and adaptability within Labii's framework.

Variables

  • Record Properties

    • {{SID}} - The SID of the current record.

    • {{UID}} - The UID of the current record.

    • {{NAME}} - The name of the current record.

    • {{DESCRIPTION}} - The description of the current record.

    • {{PROJECTS}} - The projects data of current record.

    • {{OWNER.SID}} - The SID of the owner.

    • {{OWNER.NAME}} - The owner of current record.

    • {{DATECREATED}} - The date created of the current record.

    • {{VERSION}} - The version of the current record.

    • {{SHARABLELINK}} - The sharable link generated based on the default sharing settings.

  • URL

    • {{URL}} - The current URL.

    • {{DOMAINFRONTEND}} - The current Domain.

  • Date

    • {{TODAY}} - Today's date in the format or "YYYY-MM-DD"

    • {{CURRENT:<FORMAT>}} - The current date time with the provided format

    • {{[+/-][#][DAY/WEEK/MONTH/YEAR]:<FORMAT>}} for a certain date before/after current date.

      • The <FORMAT> is optional, default to YYYY-MM-DD. For example, '{{-5WEEK}}' for 5 weeks ago in the format of YYYY-MM-DD.

      • Javascript, use the format from the momentjs: https://momentjs.com/

      • Python, currently the format is not supported.

  • Column

    • {{[COLUMN_SID]}} - Column values can be returned by using the SID of a column. For example {{nqtw0a40x1d58puzEJOTY}}

    • {{[COLUMN_SID]:<CODE>}} - Column values can be returned by using the sid of a column and further processed with an inline Javascript script.

      • In Javascript, the <CODE> can be any javascript code. For example {{nqtw0a40x1d58puzEJOTY:parseInt(data)}}

      • In Python, the <CODE> can only be the keys of dictionary separated by ".". For example: {{nqtw0a40x1d58puzEJOTY:user.sid}}

  • User

    • {{USER.SID}} - The Personnel SID of the user.

    • {{USER.NAME}} - The Name of the user.

Escape to become a variable

In scenarios where it's necessary to prevent a string from being interpreted as a variable within {{string}}, and you would prefer the string to be managed as literal text, using backslashes to escape the curly braces is an appropriate approach. To achieve this, you can employ \\{\\{string\\}\\}. This method effectively guards against the automatic conversion process that typically treats text enclosed in double curly braces as variables. By doing so, it ensures that your intended literal string remains intact and correctly rendered without being altered during parsing or execution, thereby maintaining the accuracy of the information you wish to convey.

Last updated