QR type
Overview
This type stores text and displays it as a QR code in read-only view.
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
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 provide a regular expression to validate the value of the field. The expression should follow Java regular expression syntax.
You will see the following options:
Expression
: This is the regular expression used to validate values.Hint
: In case of a validation error, you can provide a message to be displayed to the user to assist them.Case Insensitive
: If enabled, matching will be case insensitive. Note that this applies only to simple characters in the expression. For example,[a-z]
will require the letter to be in lowercase, even with this flag enabled. However, expressions like “ab” will work with variations in case when this flag is set.
Display options
Representation
Determines how the field should be displayed in the edit view. This only affects the edit view. Options include:
Input Box
: Displays a single-line input box.Text Area
: Displays a text area. You can specify the number of rows for the text area.
Limit number of characters
Limits the number of characters displayed, with a "More"
button to expand the content. This option is effective only in read-only
mode.
Error correction level
QR codes have four error correction levels that add varying amounts of "backup"
data, based on expected damage:
Level L
– Up to 7% damageLevel M
– Up to 15% damageLevel Q
– Up to 25% damageLevel H
– Up to 30% damage
Color
Hex color code for the QR code. Default is #000000
.
Background color
Hex background color code for the QR code. Default is #ffffff
.
Width
Width of the generated image in pixels. Default is 128
.
Height
Height of the generated image in pixels. Default is 250
REST API
Read format
The format is a simple string:
"name": "test1"
Write format
To set the value, you should provide a string:
"name": "new name"
JavaScript API
Read format
The val()
method within the wrapper will return a plain string:
// this will print something like "name: test1"
log('name: '+record.field('name').val());
Write format
You should provide a string to set the new value:
record.field('name').val('new name');
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
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
To perform queries, you should provide the text as a plain string. For example:
// finds companies with name like 'ae'
var records_sample = sys.data.find('companies', {'name': 'like(ae)'});
log('total: '+records_sample.count());
while (records_sample.hasNext()) {
log(records_sample.next().label());
}
// finds companies with name like 'ae'
var query_sample = sys.data.createQuery('companies')
.field('name').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 name like 'ae'
GET /data/contacts?name=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 |