oo

Fields

Liferay 7.4 2023.Q4+/GA102+

Object fields are data definitions that represent database columns and store different types of values. All objects include default system fields, but you can add custom fields to both draft and published objects.

When you publish an object draft, Liferay creates an initial database table that includes all fields and relationships in the draft at the time of publishing. Fields and relationships added after publishing are added to a side table (i.e., [Initial_Table_Name]_x).

All objects include default system fields, but you can add custom fields.

Liferay provides these field types that correspond to specific data types in the backend:

Field Types (UI) Data Type (HEADLESS) Description
Aggregation String Stores read-only values calculated using values from a relationship table. Available functions include count, sum, average, min, and max.
Attachment Relationship > Long Stores files; by default, uploaded files can be no larger than 100 MB; this field supports all file types accepted by Documents and Media.
Auto-Increment String Stores read-only values calculated by incrementing the last assigned value by 1. You can configure the starting value, prefix, and suffix (e.g., foo200bar, foo201bar, foo202bar, …).
Boolean Boolean Stores true or false values. Mandatory Boolean fields always require a true value.
Date Date Stores date values.
Date and Time DateTime Stores date and time values. You can store time values as entered or convert them to UTC.

Convert to UTC: Stores the time in UTC and displays it in the user’s timezone.

Use Input as Entered: Stores and displays the time as entered, regardless of timezone.
Decimal (previously Double) Double Stores a decimal number value with a limit of 16 digits.

Example: 999.9999999999999 (16 digits total)
Encrypted String Stores encrypted string values.
Formula Integer or Double Stores read-only values calculated using numeric fields in the object definition. During field creation, determine whether the total is stored as an integer or decimal. After creation, edit the field to set its formula. Available functions include add (+), subtract (-), multiply (*), and divide (/).
Integer Integer Stores an integer up to nine digits in length. You can choose to allow only unique values.

Maximum value: 2147483647

Minimum value: -2147483648
Long Integer (previously Long) Long Stores a large integer up to 16 digits in length.

Maximum value: 9007199254740991

Minimum value: -9007199254740991
Long Text (previously Clob) Clob Stores a text box value that supports up to 65,000 characters; after creating a long text field, you can configure it to limit the number of characters allowed.
Multiselect Picklist String Stores one or more string values from a picklist.
Picklist String Stores one string value from a picklist. After adding the field, go to the Advanced tab to set a default value. You can set this value manually by selecting a specific picklist option or dynamically using the expression builder.
Precision Decimal (previously BigDecimal) BigDecimal Stores a high-precision decimal number without rounding and supports up to 16 decimal digits.

Maximum Value: 99999999999999.9999999999999999

Minimum value: -99999999999999.9999999999999999
Relationship Long Stores the numeric ID for all related object entries. Objects automatically adds relationship fields to objects on the child side of a one-to-many relationship. See Defining Object Relationships for more information.
Rich Text Clob Stores text with advanced formatting tools and media elements (e.g., images, videos, audio).
Text (previously String) String Stores simple text values up to 280 characters. You can choose to allow only unique values. After creating the field, you can limit the number of characters allowed.
Feature: