Skip to main content
Version: 1.20.1

Column Types in Client and Server Scripts

In the article below, find the values passed to client and server scripts according to the type of the column they are in. Most of the values passed in the both scripts are the same, the differences are reflected below.

To find out what type of data a particular field of the form takes, right-click its name to call the context menu, and select Field info. The window that appears displays the name of the column, its system name, type, and value.

Fields with no choice

Big Integer


Entry on the form: 1232886464646464446

getValue(): 1232886464646464446

getDisplayValue(): 1232886464646464446

Decimal


Entry on the form: 123.45

getValue(): 123.45

getDisplayValue(): 123.45

Duration


Entry on the form: 01 days 01 hours 01 minutes 01 seconds

getValue(): 90061000

getDisplayValue():

  • Client script: 90061000
  • Server script: 01 01:01:01

Enum form_split_element_type


Entry on the form: begin_split

getValue(): begin_split

getDisplayValue(): begin_split

Float


Entry on the form: 2222222.2222

getValue(): 2222222.2222

getDisplayValue(): 2222222.2222

Html


Entry on the form:

<html data-lt-installed="true">
<head>
<title></title>
</head>
<body data-gramm="false" data-lt-tmp-id="lt-752273">
<p>Вы находитесь на странице документации SimpleOne.</p>
</body>
</html>

getValue():

<html data-lt-installed="true">
<head>
<title></title>
</head>
<body data-gramm="false" data-lt-tmp-id="lt-752273">
<p>Вы находитесь на странице документации SimpleOne.</p>
</body>
</html>

getDisplayValue():

<html data-lt-installed="true">
<head>
<title></title>
</head>
<body data-gramm="false" data-lt-tmp-id="lt-752273">
<p>Вы находитесь на странице документации SimpleOne.</p>
</body>
</html>

Integer


Entry on the form: 123

getValue(): 123

getDisplayValue(): 123

Journal Input


Entry on the form: This is my best comment!

note

The value disappears after saving the form.

getValue(): -

getDisplayValue(): -

JSON


Entry on the form:

{"name":"More","sector":"Oil and gas","top500":1}

getValue():

{"name":"More","sector":"Oil and gas","top500":1}

getDisplayValue():

{"name":"More","sector":"Oil and gas","top500":1}

Password


Entry on the form: ItsaVeryStr0ngPassword

note

The value disappears after saving the form.

getValue():

  • Client script: -
  • Server script: $2y$13$OSphZNWbAbAJrvA.J65QhO4Q3eAocDWKXZmAryH1gn/UZZCxHTinO

getDisplayValue(): -

Encrypted password


Entry on the form: 546789-2ssfd

note

The value disappears after saving the form.

getValue():

  • Client script: -
  • Server script: EgKfp1hEhBY9SlUpqO4QGA==

getDisplayValue(): -

Percent Complete


Entry on the form: 99.00

getValue():

  • Client script: 99.00
  • Server script: 99

getDisplayValue(): 99.00

Phone


Entry on the form: +79992848090

getValue(): +79992848090

getDisplayValue(): +79992848090

Script


Entry on the form:

const callerId = s_form.getValue('caller_id');
if (!callerId) return;
const callerRecord = new SimpleRecord('employee');
callerRecord.get(callerId, ()=> {
if (callerRecord.sys_id && callerRecord.personal_schedule) {
s_form.setValue('schedule', callerRecord.personal_schedule);
return;
}
s_form.addInfoMessage('Расписание пользователя не определено');
});

getValue():

const callerId = s_form.getValue('caller_id');
if (!callerId) return;
const callerRecord = new SimpleRecord('employee');
callerRecord.get(callerId, ()=> {
if (callerRecord.sys_id && callerRecord.personal_schedule) {
s_form.setValue('schedule', callerRecord.personal_schedule);
return;
}
s_form.addInfoMessage('Расписание пользователя не определено');
});

getDisplayValue():

const callerId = s_form.getValue('caller_id');
if (!callerId) return;
const callerRecord = new SimpleRecord('employee');
callerRecord.get(callerId, ()=> {
if (callerRecord.sys_id && callerRecord.personal_schedule) {
s_form.setValue('schedule', callerRecord.personal_schedule);
return;
}
s_form.addInfoMessage('Расписание пользователя не определено');
});

Small Integer


Entry on the form: 23

getValue(): 23

getDisplayValue(): 23

String


Entry on the form: Hello

getValue(): Hello

getDisplayValue(): Hello

Text


Entry on the form:

Kind regards,
SimpleOne

getValue(): 'Kind regards,\nSimpleone'

getDisplayValue(): 'Kind regards,\nSimpleone'

Translated text


Entry on the form: Completed

note

The text value that has a translation in the System Translations (sys_translation) table is displayed in the language set in Preferences.

getValue(): Completed

getDisplayValue(): Completed

URL


Entry on the form: your.instance.simpleone.ru

getValue(): your.instance.simpleone.ru

getDisplayValue(): your.instance.simpleone.ru

Choice fields

True/False


Entry on the form: A checkbox is selected

getValue():

  • Client script: 1
  • Server script: true

getDisplayValue():

  • Client script: 1
  • Server script: Yes

Choice


Entry on the form: In the drop-down list, the option Changed is selected.

getValue(): Changed

getDisplayValue(): Changed

Color


Entry on the form: A yellow color selected in the palette, the field displays the hex of the color #fccb00.

getValue(): #fccb00

getDisplayValue(): #fccb00

Conditions


Entry on the form: Active is No

getValue(): (active=0)

getDisplayValue(): (active=0)

Date


Entry on the form: 2000-12-31

getValue(): 2000-12-31

getDisplayValue(): 2000-12-31

Date/Time


Entry on the form: 2022-12-22 19:22:22

getValue(): 2022-12-22 19:22:22

getDisplayValue(): 2022-12-22 19:22:22

Date/Time Specific


Entry on the form: 2022-08-31 07:34:12

getValue(): 2022-08-31 07:34:12

getDisplayValue(): 2022-08-31 07:34:12

Days Of week


Entry on the form: Days selected from the list: Wednesday, Thursday, and Friday.

getValue(): 28

getDisplayValue(): 28

Document ID


Entry on the form: A record is selected, the field contains a reference with a displayable name.

getValue():

  • Client script: 0229fa8abcbe1f540229fa8abcbe1f01
  • Server script: 0229fa8a-bcbe-1f54-0229-fa8abcbe1f01

getDisplayValue():

  • Client script: Admin User
  • Server script: User: Admin User

Field Name


Entry on the form: Assigned user field

getValue(): 155931135900001080

getDisplayValue(): Assigned user

Image


Entry on the form: An image is attached.

getValue(): 168139165117069552

getDisplayValue():

  • Client script: {sys_id:'168139165117069552',delete_:'/ image/delete/168139165117069552',:'http://s3.simple.test/...', original_:'http://s3.simple.test/...',file_size:248.833,file_name:'image.png'}
  • Server script: 168139165117069552

List


Entry on the form: The records Admin User and Guest User are selected from the list, the field contains the displayed names of the records: Admin and Guest User.

getValue(): 155931135900000001,100000000000000001

getDisplayValue(): Admin User, Guest User

Record Class


Entry on the form: The field contains a link to the table Services. The link appears after saving the form.

getValue(): 157233752019606969

getDisplayValue(): Services

Reference


Entry on the form: A record Level is selected.

getValue(): 167327603510375360

getDisplayValue(): Level

Template


Entry on the form: Policy > Protected

getValue():

  • Client script: {"167327603610803300": "Protected"}
  • Server script: {"1": {"167327603610803300": "Protected"}}

getDisplayValue():

  • Client script: {"167327603610803300": "Protected"}
  • Server script: {"1": {"167327603610803300": "Protected"}}

Time


Entry on the form: 07:59:22

getValue(): 07:59:22

getDisplayValue(): 07:59:22