Overview
This type can store free text. Fields of this type are useful for storing long-form text string.
Available features
Name | Supported | Notes |
---|---|---|
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
The minimum number of characters that values can have.
Maximum length
The maximum number of characters that values can have.
Exact length
The value must have exactly this number of characters.
Display options
Representation
How this field should be displayed. Options are:
Text area
: a text area will be displayed. There is another option to indicate the number of rows the text area should have.Code editor
: a codemirror code editor will be displayed in case to edit and display text with format in read only mode.
Number of rows
The number of rows in the text area used for this field. Minimum is 1 and maximum 100.
Limit number of characters
This will limit the number of characters to display, showing a More
button to expand the content.
Keep in mind that this option only has effect when the field is read-only.
Language
Allow select the language to style when select code editor representation. The availabe languages are:
- Java
- Javascript
- HTML
- CSS
- Shell
- Markdown
- SQL
- YAML
Size
Allow select size when select code editor representation. There are a predefined list:
small
, medium
, large
x
, auto
and custom
.
If you chose custom you need set width and height in pixels.
REST API
Read format
The format is a simple string:
"notes": "test notes"
Write format
You should pass a string:
"notes": "new notes"
Javascript API
Read format
The val()
method in the wrapper will return a plain string:
// this will print something like "notes: test notes"
log('notes: '+record.field('notes').val());
Write format
You should pass a plain string to set the value:
record.field('notes').val('new notes');
Wrapper
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
Please check the documentation for Query language for more information.
Available operators
Operator | Supported | Notes |
---|---|---|
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 pass the text as a plain string. For example:
// finds companies with notes like 'ae'
var records = sys.data.find('companies', {'notes': 'like(ae)'});
log('total: '+records.count());
while (records.hasNext()) {
log(records.next().label());
}
// finds companies with notes like 'ae'
var query = sys.data.createQuery('companies')
.field('notes').like('ae');
var records = sys.data.find(query);
log('total: '+records.count());
while (records.hasNext()) {
log(records.next().label());
}
finds companies with notes like 'ae'
GET /data/companies?notes=like(ae)
Aggregate queries
Please check the documentation for Aggregate queries for more information.
Available operators
Operator | Supported | Notes |
---|---|---|
sum |
no |
|
avg |
no |
|
first |
yes |
|
last |
yes |
|
min |
yes |
|
max |
yes |
|
UI queries
Please check the documentation for UI queries for more information.
Matching of values
Property | Description |
---|---|
Matching operator |
|
Special values |
Available operators
Operator | Supported | Notes |
---|---|---|
Many values |
yes |
|
Greater |
no |
|
Greater or equals |
no |
|
Less |
yes |
|
Less or equals |
yes |
|
Between |
no |
|