Long Text type
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
Name | Supported |
---|---|
Many multiplicity | yes |
Default values | yes |
Unique flag | yes |
Required flag | yes |
Indexable flag | yes |
Sensitive flag | yes |
Calculated value | yes |
Automatic initialization | no |
Calculated initial value | no |
Aggregation | no |
Default type rules | yes |
Default display options | yes |
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
Operator | Supported |
---|---|
equals | yes |
notEquals | yes |
empty | yes |
notEmpty | yes |
like | yes |
greater | yes |
greaterOrEquals | yes |
less | yes |
lessOrEquals | yes |
between | yes |
currentUserField | no |
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
Operator | Supported |
---|---|
sum | no |
avg | no |
first | yes |
last | yes |
min | yes |
max | yes |
UI queries
Please refer to the UI Queries Documentation for more detailed information.
Matching of values
Property | Description |
---|---|
Matching operator | like |
Available operators
Operator | Supported |
---|---|
Many values | yes |
Greater | no |
Greater or equals | no |
Less | yes |
Less or equals | yes |
Between | no |