Long Text type

Long Text type documentation.

Overview

This field type is designed to store free text. Fields of this type are particularly useful for storing long-form text strings.

Available features

NameSupported
Many multiplicityyes
Default valuesyes
Unique flagyes
Required flagyes
Indexable flagyes
Sensitive flagyes
Calculated valueyes
Automatic initializationno
Calculated initial valueno
Aggregationno
Default type rulesyes
Default display optionsyes

Type rules

  • Minimum Length: Specifies the minimum number of characters that values can have.

  • Maximum Length: Specifies the maximum number of characters that values can have.

  • Exact Length: Requires the value to have an exact number of characters as specified.

Display options

Representation

Specifies how this field should be displayed. The available options are:

  • Text Area: Displays a text area. You can specify the number of rows the text area should have.
  • Code Editor: Displays a CodeMirror code editor for editing and displaying text with formatting in read-only mode.

Number of rows

Specifies the number of rows in the text area used for this field. The minimum is 1, and the maximum is 100.

Limit number of characters

Enabling this option will restrict the number of characters displayed, along with a “More” button to expand the content.

Please note that this option only takes effect when the field is in read-only mode.

Language

Allows you to select the programming language for styling when using the code editor representation. Available languages are:

  • Java
  • Javascript
  • HTML
  • CSS
  • Shell
  • Markdown
  • SQL
  • YAML

Size

Allows you to choose a size when opting for the code editor representation. Predefined options include: small, medium, large, extra large (x), auto, and custom.

If you choose “custom,” you need to set the width and height in pixels.

REST API

Read format

The format is a simple string:

"notes": "test notes"

Write format

You should provide a string:

"notes": "new notes"

JavaScript API

Read format

The val() method within the wrapper will return a plain string:

// this will print something like "notes: test notes"
log('notes: '+record.field('notes').val());

Write format

To set the value, you should provide a plain string:

record.field('notes').val('new notes');

Export/Import

Export format

The export format is a simple string:

"longTextField1","longTextField2"
"line1\nline2","this is a long text"

Import format

The import format is a simple string:

"longTextField1","longTextField2"
"line1\nline2","this is a long text"

Queries

For more information, please refer to the Query Language Documentation.

Available operators

OperatorSupported
equalsyes
notEqualsyes
emptyyes
notEmptyyes
likeyes
greateryes
greaterOrEqualsyes
lessyes
lessOrEqualsyes
betweenyes
currentUserFieldno

Query formats

You should provide the text as a plain string. For example:

// finds companies with notes like 'ae' 
var records_sample = sys.data.find('companies', {'notes': 'like(ae)'});
log('total: '+records_sample.count());
while (records_sample.hasNext()) {
    log(records_sample.next().label());
}
// finds companies with notes like 'ae' 
var query_sample = sys.data.createQuery('companies')
    .field('notes').like('ae')
var records_sample = sys.data.find(query_sample);
log('total: '+records_sample.count());
while (records_sample.hasNext()) {
    log(records_sample.next().label());
}
// finds companies with notes like 'ae' 
GET /data/contacts?notes=like(ae)

Aggregate queries

Please refer to the Aggregate Queries Documentation for more detailed information.

Available operators

OperatorSupported
sumno
avgno
firstyes
lastyes
minyes
maxyes

UI queries

Please refer to the UI Queries Documentation for more detailed information.

Matching of values

PropertyDescription
Matching operatorlike

Available operators

OperatorSupported
Many valuesyes
Greaterno
Greater or equalsno
Lessyes
Less or equalsyes
Betweenno