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
AggregationStringStores read-only values calculated using values from a relationship table. Available functions include count, sum, average, min, and max.
AttachmentRelationship > LongStores files; by default, uploaded files can be no larger than 100 MB; this field supports all file types accepted by Documents and Media.
Auto-IncrementStringStores 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, …).
BooleanBooleanStores true or false values. Mandatory Boolean fields always require a true value.
DateDateStores date values.
Date and TimeDateTimeStores 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)DoubleStores a decimal number value with a limit of 16 digits.

Example: 999.9999999999999 (16 digits total)
EncryptedStringStores encrypted string values.
FormulaInteger or DoubleStores 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 (/).
IntegerIntegerStores 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)LongStores a large integer up to 16 digits in length.

Maximum value: 9007199254740991

Minimum value: -9007199254740991
Long Text (previously Clob)ClobStores 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 PicklistStringStores one or more string values from a picklist.
PicklistStringStores 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)BigDecimalStores a high-precision decimal number without rounding and supports up to 16 decimal digits.

Maximum Value: 99999999999999.9999999999999999

Minimum value: -99999999999999.9999999999999999
RelationshipLongStores 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 TextClobStores text with advanced formatting tools and media elements (e.g., images, videos, audio).
Text (previously String)StringStores 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.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy