Overview
This type can store a URL, for example http://www.test.com/path
. This field will be rendered as a link.
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 |
no |
|
Default display options |
yes |
|
Type rules
Display options
Open in current tab
If this flag is set the link will be open in the same tab. Otherwise it will be open in a new tab.
REST API
Read format
The format is a simple string with the URL:
"homepage": "http://www.test.com"
Write format
You should pass a string with the URL:
"homepage": "http://www.test.com"
The value of a URL could be just a URL, but we also can use a markdown to make it more readable.
"homepage": "(http://www.test.com)<Test>"
Javascript API
Read format
The val()
method in the wrapper will return a plain string with the URL:
// this will print something like "url: http://www.test.com"
log('url: '+record.field('homepage').val());
Otherwise it will return the markdown value:
// this will print something like "url+label: (http://www.test.com)<Test>"
log('url+label: '+record.field('homepage').val());
If we want to read just the URL:
// this will print something like "url: http://www.test.com"
log('url: '+record.field('homepage').url());
If we want to read just the label:
// this will print something like "label: Test"
log('label: '+record.field('homepage').text());
Write format
You should pass a plain string with the URL to set the value:
record.field('homepage').val('http://www.test1.com');
You can also use a markdown to set the URL and the label:
record.field('homepage').val('(http://www.test1.com)<Test>');
Wrapper
Export/Import
Export format
The export format is a simple string:
"urlField1","urlField2"
"http://www.google.com","www.google.com"
Import format
The import format is a simple string:
"urlField1","urlField2"
"http://www.google.com","www.google.com"
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 URL as a plain string. For example:
// finds companies with homepage like 'test'
var records = sys.data.find('companies', {'homepage': 'like(test)'});
log('total: '+records.count());
while (records.hasNext()) {
log(records.next().label());
}
// finds companies with homepage like 'test'
var query = sys.data.createQuery('companies')
.field('homepage').like('test');
var records = sys.data.find(query);
log('total: '+records.count());
while (records.hasNext()) {
log(records.next().label());
}
finds companies with homepage like 'test'
GET /data/companies?homepage=like(test)
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 |
|