[en] Data Types
[en] Lambda processes work with a defined set of data types that are important to understand to model process logic correctly. Below, you will find a brief definition and best practices on each data type.
[en] Texts represent character strings such as names, addresses, descriptions, etc. When using text strings, consider the following best practices:
[en] Use them for data that will not be numerically processed.
[en] Validate the length or format when required (e.g., using regular expressions).
[en] Use the convert to text block to transform numeric values into text.
[en] To retrieve the value of a register that contains text, use the register text block. The #S expression should not be used.
[en] Numbers represent numeric values, both integers and decimals. When using numbers, consider the following best practices:
Sugerencia
[en] Lambda processes use decimal notation for numerical manipulation. The register number block accepts both decimal and Veritran (VT) notation, and VT values are automatically converted into decimal.
[en] To convert from decimal to VT notation, use the parse number to VT notation block.
[en] Be mindful of rounding and formatting, especially when the value is displayed to the user.
[en] If the number represents a non-quantitative entity (e.g., postal code), consider treating it as text.
[en] If an array contains columns in VT notation, you should assign the value to a register and then retrieve the value using the register number block. This is necessary because there is currently no block to convert VT notation to decimal.
[en] To retrieve the value of a register that contains a number, use the register number block. The #S expression should not be used.
[en] Booleans represent a true or false value. They can be set directly to true or false, or be the result of a logical expression (e.g., comparison, validation). They are commonly used in conditional structures (if, else if, etc.). When using booleans, consider the following best practices:
[en] Use names that clearly express a condition (e.g., isActive, hasDiscount).
[en] Avoid using the negative (e.g., notActive).
[en] Lists represent an ordered collection of elements of the same type. When using lists, consider the following best practices:
[en] Ensure consistency in the data type of the elements included in the list. Avoid mixing types (e.g., number and text) in the same list.
[en] Arrays are a specific kind of list, structured as a list of lists. The Arrays section provides more details on operations commonly performed using this data type and its best practices.
[en] JSON objects represent a data structure composed of key-value pairs. They can be nested, this means that values may themselves be objects or lists. The JSON objects section provides more details on best practices to apply when creating or parsing JSON objects.
Importante
[en] JSON is currently the only supported object type in lambda processes.