URL type

URL type documentation.

Overview

This field type is designed for storing URLs, such as http://www.test.com/path. The field will be displayed as a clickable link.

Available features

NameSupported
Many multiplicityyes
Default valuesyes
Unique flagyes
Required flagyes
Indexable flagyes
Sensitive flagyes
Calculated valueyes
Automatic initializationno
Calculated initial valueno
Aggregationno
Default type rulesno
Default display optionsyes

Display options

Open in current tab

Enabling this flag causes the link to open in the same tab. If the flag is not set, the link will open in a new tab.

REST API

Read format

The format consists of a simple string representing the URL:

"homepage": "http://www.test.com"

Write format

To set the value, you should provide a string with the URL:

"homepage": "http://www.test.com"

The value of a URL can be a straightforward URL, but it’s also possible to utilize Markdown to enhance its readability.

"homepage": "(http://www.test.com)<Test>"

JavaScript API

Read format

The val() method in the wrapper will return a plain string representing the URL:

// this will print something like "url: http://www.test.com"
log('url: '+record.field('homepage').val());

Alternatively, 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 you wish to retrieve only the URL:

// this will print something like "url: http://www.test.com"
log('url: '+record.field('homepage').url());

If you’re interested in retrieving only the label:

// this will print something like "label: Test"
log('label: '+record.field('homepage').text());

Write format

To set the value, you should provide a plain string containing the URL:

record.field('homepage').val('http://www.test1.com');

You can also use Markdown to define both the URL and the label:

record.field('homepage').val('(http://www.test1.com)<Test>');

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

For more information, please refer to the Query Language Documentation.

Available operators

OperatorSupported
equalsyes
notEqualsyes
emptyyes
notEmptyyes
likeyes
greateryes
greaterOrEqualsyes
lessyes
lessOrEqualsyes
betweenyes
currentUserFieldno

Query formats

For equality queries, you can provide the value with or without the mask format. For example:

// finds companies with homepage like 'test' 
var records_sample = sys.data.find('companies', {'homepage': 'like(test)'});
log('total: '+records_sample.count());
while (records_sample.hasNext()) {
    log(records_sample.next().label());
}
// finds companies with homepage like 'test' 
var query_sample = sys.data.createQuery('companies')
    .field('homepage').like('test')
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 homepage like 'test' 
GET /data/contacts?homepage=like(test)

Aggregate queries

Please refer to the Aggregate Queries Documentation for more detailed information.

Available operators

OperatorSupported
sumno
avgno
firstyes
lastyes
minyes
maxyes

UI queries

Please refer to the UI Queries Documentation for more detailed information.

Matching of values

PropertyDescription
Matching operatorlike

Available operators

OperatorSupported
Many valuesyes
Greaterno
Greater or equalsno
Lessyes
Less or equalsyes
Betweenno