Overview
This type can store free text up to 300 characters. If you need more than that please use the type Long text.
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.
Regular expression
If set you can write a regular expression to validate the value of the field. This expression should follow regular expressions in Java.
You will see the following options:
Expression
: this is the regular expression to validate values.Hint
: if there is a validation error, here you can write a message that will be displayed to the user to help him.Case insensitive
: if this flag is set, matching will be case insensitive. Keep in mind this is only taken into account for simple characters in the expression. For example if you have[a-z]
it will require the letter to be in lower case even when this flag is set, but if you putab
in the expression, things likeAb
orAB
will work.
Display options
Representation
How this field should be displayed. This only has effect on edit view. Options are:
Input box
: a single-line input box will be displayed.Text area
: a text area will be displayed. There is another option to indicate the number of rows the text area should have.
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.
Background Color
Define that text value should display as label in read only view. By default this value is null, it means that value is displayed as without label. It is possible to define many conditional background color rules. For each one a color must be selected and a expression must be defined. All fields matching the expression will use the selected color. Alternatively you can use a script instead of an expression. The available paramenters for this script are:
record
: the current record the field is part of.parentField
: used when the field is an inner field of a nested field type. You can use this paramenter to refer to the sibling fields as well.action
: used when the field is a paramenter of an action.
Keep in mind that this option only has effect when the field is read-only.
Password type
Represents an edit control for entering a password.
REST API
Read format
The format is a simple string:
"name": "test1"
Write format
You should pass a string:
"name": "new name"
Javascript API
Read format
The val()
method in the wrapper will return a plain string:
// this will print something like "name: test1"
log('name: '+record.field('name').val());
Write format
You should pass a plain string to set the value:
record.field('name').val('new name');
Wrapper
Export/Import
Export format
The export format is a simple string:
"textField1","textField2"
"value1","this is a long text"
Import format
The import format is a simple string:
"textField1","textField2"
"value1","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 name like 'ae'
var records = sys.data.find('companies', {'name': 'like(ae)'});
log('total: '+records.count());
while (records.hasNext()) {
log(records.next().label());
}
// finds companies with name like 'ae'
var query = sys.data.createQuery('companies')
.field('name').like('ae');
var records = sys.data.find(query);
log('total: '+records.count());
while (records.hasNext()) {
log(records.next().label());
}
finds companies with name like 'ae'
GET /data/companies?name=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 |
|