Nomenclature

HTML DOM Styling

HTML DOM Styling refers to a JavaScript object which specifies one or more style properties, e.g.:

{ background : "blue", paddingLeft : "10px" }

A good reference on HTML DOM styling can be found at w3schools.

Note that translucent backgrounds should be specified using rgba, i.e.:

{ background : "rgba(204,165,165,0.5)" }

Inheritance Stop Point

In some instances, properties are not inherited beyond a stop point. For example, app.dbiScriptProperties.dataTables.deletes.confirm.isUniversal has an inheritance stop point at app.dbiScriptProperties.dataTables. This means that unlike the .dataTables properties which do not have inheritance stop points, .deletes.confirmUniveral is not inherited by [data table element]s.

Application Class

app.dbiScriptProperties{properties}
app.dbiScriptProperties.rebuildDatabase = true;

.appendTimeZoneToTitle

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

When set to true, the local (user’s) time zone is appended to the HTML document title.

.dataConfig

Data TypeAcceptable ValuesDefault Value
StringPath to configuration fileNone

This property is required. Specify the relative path on your webserver from the location of the dbiScript.js file to your data configuration file. Note that either "/" or "\\" can be used as the directory separator – the double "\" is required because JavaScript’s escape character is "\".

.rebuildDatabase

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

When set to true, dbiScript will examine the database and make any changes necessary to synch the actual database design with the design specified in dbiScript. This property is ignored unless the line allowRebuildDatabase = True exists in your configuration file.

.sessionExpirationMinutes

Data TypeAcceptable ValuesDefault Value
Number0+5

Specifies the time in minutes before a user’s login session will expire. When a user’s session expires, a window will popup informing them that their session will soon expire. If the user clicks the "Extend Login" button or presses the Esc key, their session will be extended by .sessionExpirationMinutes minutes. If they click the "Logout" button or the window timer expires, they will be logged out of their session. If .sessionExpirationMinutes is 0, sessions do not expire.

Development mode sessions do not expire.

.sessionExpirationWindowDisplaySeconds

Data TypeAcceptable ValuesDefault Value
Number0+5

Specifies the time in seconds that the session expiration window is displayed before the user is automatically logged out. If .sessionExpirationWindowDisplaySeconds is 0, users are immediately logged out as soon as their session expires.

Users Class

app.dbiScriptProperties.users{properties}
app.dbiScriptProperties.users.firstName.isRequired = false;

.firstName.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

This property applies to the first name field of the system users table. If .isRequired is true, the user’s first name must be entered before the row can be saved.

.lastName.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

This property applies to the last name field of the system users table. If .isRequired is true, the user’s last name must be entered before the row can be saved.

Login Class

app.dbiScriptProperties.login{properties}
app.dbiScriptProperties.login.password.minStrength = 75;

.password.minLength

Data TypeAcceptable ValuesDefault Value
Integer0+0

The minimum password length to obtain a score of 50% (the .minStrength default) is generally 8 characters, however it is possible to obtain a score of 50% with fewer characters. Set .minLength to a non-zero value to force a minimum password length.

.password.minStrength

Data TypeAcceptable ValuesDefault Value
Integer0 – 10050

This property specifies the minimum allowable password strength where the strength is scored from 0 – 100%. The strength of a password is increased by incorporating combinations of uppercase letters, lowercase letters, numerals and symbols. To obtain a score of 50%, at least one character from three of these four groups is generally required, however the algorithm used to score the password strength is complex and uses several characteristics of the password to calculate the score.

Table Class

dbiScript includes five types of table objects: data tables, definition tables, file tables, link tables and photo tables. Each table object type inherits from app.dbiScriptProperties.tables.

[table element].dbiScriptProperties{properties}
app.dbiScriptProperties.tables{properties}

.auditColumns.create

Data TypeAcceptable ValuesDefault Value
Booleantrue, false, undefinedtrue
4 Element Array of Booleans[Boolean,Boolean,Boolean,Boolean] 

Whenever the database is rebuilt, dbiScript will check each table and append the audit columns to any tables which are missing them and for which this setting is true. Any table for which this setting is false will have any existing audit columns dropped. A setting of undefined will not force any changes in the database. A single Boolean value will affect all four audit columns whereas an array will specify the setting for each individual audit column, in the order listed in this table. When using an array, a setting of undefined can be used for any element which corresponds to an audit column that should not be modified.

The audit column settings are inherited by every table in the application, initially from app.dbiScriptProperties.tables.auditColumns and then app.dbiScriptProperties.[table class].auditColumns where [table class] is in ["dataTables","fileTables","linkTables","photoTables"] (e.g. app.dbiScriptProperties.dataTables.auditColumns).

.auditColumns.indexed

Data TypeAcceptable ValuesDefault Value
Booleantrue, false, undefinedundefined
4 Element Array of Booleans[Boolean,Boolean,Boolean,Boolean] 

Use this property to add or remove indexes from audit columns. A setting of undefined will not force any changes in the database whereas a true setting will add indexes and a false value will drop indexes. A single Boolean value will affect all four audit columns whereas an array will specify the setting for each individual audit column, in the order listed in this table. When using an array, a setting of undefined can be used for any element which corresponds to an audit column that should not be modified.

.auditColumns.names

Data TypeAcceptable ValuesDefault Value
4 Element Array of Strings[String,String,String,String]See Audit Columns

Use this property to override the default column names. The elements of the array correspond to the audit columns in the order listed in this table. An array element that contains undefined or an empty string ("") indicates a dormant audit column. Dormant audit columns are ignored whenever the database is rebuilt. Any value specified by an array for any [table element].auditColumns property is ignored for dormant audit columns.

.auditColumns.allowNull

Data TypeAcceptable ValuesDefault Value
Booleantrue, false, undefinedfalse
4 Element Array of Booleans[Boolean,Boolean,Boolean,Boolean] 

Use this property to specify whether or not the audit columns accept null values. A setting of undefined will not force any changes in the database whereas a false setting will add NOT NULL to the column definitions and a true value will drop the NOT NULL. A single Boolean value will affect all four audit columns whereas an array will specify the setting for each individual audit column, in the order listed in this table. When using an array, a setting of undefined can be used for any element which corresponds to an audit column that should not be modified.

.auditColumns.renameFrom

Data TypeAcceptable ValuesDefault Value
4 Element Array of Strings[String,String,String,String]None

Use this property to have dbiScript rename columns in the table from the names specified in this array to the names listed in this table (or those specified with [table element].auditColumns.names). Any array element that does not contain a non-zero length string (i.e. "" or undefined) will be ignored.

.primaryKey

Data TypeAcceptable ValuesDefault Value
StringNon-zero-length string"pid"

Each table in the database must have a primary key. In S1 and S2 tables, there is one foreign key which can also be the primary key. In all other table types, the primary key must be an auto-generated (identity) column.

The following information pertains only to Data Tables:

When building a dbiScript application against an existing database, if the primary key is also the foreign key (for S1/S2 tables only), it is not necessary to specify .primaryKey – dbiScript will set it to the foreign key.

When building a database through dbiScript, if it is desired for the primary key to also be the foreign key (S1/S2 tables only), then the value of .primaryKey must be set to the foreign key name. In this scenario, if .primaryKey is not set to the foreign key and the database is rebuilt, an auto-generated (identity) primary key will be added to the table with the column name specified by the value of .primaryKey. If .primaryKey is set to the foreign key and the database again rebuilt, the auto-generated column will be removed and the foreign key will be set as the primary key.

For all other (non-S1/S2) table types, an error will occur if .primaryKey is set to a foreign key of the table.

For all table types, an error will occur if .primaryKey is set to a field which appears in the GUI.

Definition Table Class

[definition table element].dbiScriptProperties{properties}
app.dbiScriptProperties.definitionTables{properties}
app.dbiScriptProperties.tables{properties}

The definition table class has no unique properties.

File Table Class

[file table element].dbiScriptProperties{properties}
app.dbiScriptProperties.fileTables{properties}
app.dbiScriptProperties.tables{properties}

The file table class has no unique properties.

Link Table Class

[link table element].dbiScriptProperties{properties}
app.dbiScriptProperties.linkTables{properties}
app.dbiScriptProperties.tables{properties}

The link table class has no unique properties.

Photo Table Class

[photo table element].dbiScriptProperties{properties}
app.dbiScriptProperties.photoTables{properties}
app.dbiScriptProperties.tables{properties}

The photo table class has no unique properties.

Data Table Class

[data table element].dbiScriptProperties{properties}
app.dbiScriptProperties.dataTables{properties}
app.dbiScriptProperties.tables{properties}
[data table element].dbiScriptProperties.autoMinimize
inherits from
app.dbiScriptProperties.tables.autoMinimize
app.gui.appendDataTable("table1","Table 1",{autoMinimize:true});
var o = app.gui.appendDataTable("table1","Table 1");
o.dbiScriptProperties.autoMinimize = true;

.autoMinimize

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

When set to true, selecting a row will also hide all the unselected rows in the table. The toolbar Minimize [ Minimize Toolbar Button ] and Maximize [ Maximize Toolbar Button ] buttons provide manual control of the displayed rows.

.deletes.confirm.isUniversal

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse
Inheritance Stop Pointapp.dbiScriptProperties.dataTables

When .deletes.confirm.isUniversal is true, checking the Don’t ask again check box on the delete confirmation dialog suppresses the dialog for all subsequent deletes (photos, rows and treeview items).

.deletes.confirm.photos.isGlobal

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse
Inheritance Stop Pointapp.dbiScriptProperties.dataTables

When .deletes.confirm.photos.isGlobal is true, checking the Don’t ask again check box on the delete confirmation dialog suppresses the dialog when deleting a subsequent photo from any photo album during the current session. The default, false, suppresses the dialog only when deleting subsequent photos in the current photo album.

This property is ignored if app.dbiScriptProperties.deletes.confirm.isUniversal is true.

.deletes.confirm.rows.isGlobal

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse
Inheritance Stop Pointapp.dbiScriptProperties.dataTables

When .deletes.confirm.rows.isGlobal is true, checking the Don’t ask again check box on the delete confirmation dialog suppresses the dialog when deleting a subsequent row from any table during the current session. The default, false, suppresses the dialog only when deleting subsequent rows in the current table.

This property is ignored if app.dbiScriptProperties.deletes.confirm.isUniversal is true.

.deletes.confirm.treeviewItems.isGlobal

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse
Inheritance Stop Pointapp.dbiScriptProperties.dataTables

When .deletes.confirm.treeviewItems.isGlobal is true, checking the Don’t ask again check box on the delete confirmation dialog suppresses the dialog when deleting a subsequent tree item from any treeview during the current session. The default, false, suppresses the dialog only when deleting subsequent items in the current treeview.

This property is ignored if app.dbiScriptProperties.deletes.confirm.isUniversal is true.

.fetchAll

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

Only applies to databases which contain at least one multi-parent relationship (types M1, M3 and M5). When set to false, every table which is a parent in a multi-parent relationship will initially only display its rows for which a child row exists. The Fetch All toggle button (immediately below the toolbar within the table’s column caption row) provides the user with manual control over the display of these rows.

.handleLostLock

Data TypeAcceptable ValuesDefault Value
Integer0 – 20

This property specifies how lost locks are handled. The following table explains the effect of each setting on the following scenario:

  • User A locks (edits) the row.
  • User A loses their connection to the internet (while editing the row).
  • User A’s lock on the row expires (after 6 seconds without a lock update).
  • User B locks (edits) the row. User A reestablishes their internet connection.
ValueDescription
0The lock stays with user B.
User A is informed that the lock has been lost to user B.
User A’s changes to the row (if any) are cancelled and their row is returned to display mode.
1The lock is returned to user A.
User B is informed that the lock has been returned to user A.
User B’s changes to the row (if any) are cancelled and their row is returned to display mode.
2User A is given the option of:
  • asking user B for control of the row, or
  • cancelling their changes (if any) to the row and reverting to display mode.
If user A choses to ask user B for control of the row then user B has the option of:
  • retaining control of the row, or
  • returning control of the row to user A.
If user B returns control to user A then user B’s changes to the row (if any) are cancelled and their row is returned to display mode.
If user B retains control of the row then user A’s changes to the row (if any) are cancelled and their row is returned to display mode.

.pageSize

Data TypeAcceptable ValuesDefault Value
Integer1+15

This property specifies the number of rows in each page of data.

.windows.sort.fieldListOrder

Data TypeAcceptable ValuesDefault Value
String"alphabetical", "physical""alphabetical"

This property specifies the order in which the table’s fields are listed in the table’s sort window (within the select element). When .windows.sort.fieldListOrder is "physical", the fields are listed in the order in which they were added to the table.

Data Table Photo Class

[photo album element].dbiScriptProperties{properties}
[data table element].dbiScriptProperties.photos{properties}
app.dbiScriptProperties.dataTables.photos{properties}

.deletes.allowWithoutConfirm

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

When .deletes.allowWithoutConfirm is true, the delete photo dialog box includes a Don’t ask again checkbox. This property is ignored if .deletes.confirm is false.

.deletes.confirm

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

When .deletes.confirm is true, the user is prompted to confirm every photo delete.

.dimensions.height

Data TypeAcceptable ValuesDefault Value
Integer100+270

This property specifies the height in pixels of the photos displayed in the dataTable. All tables within a pageframe use the same photo dimensions which are specified for the dominant dataTable of the pageframe (the table with inline rows).

.dimensions.width

Data TypeAcceptable ValuesDefault Value
Integer100+300

This property specifies the width in pixels of the photos displayed in the dataTable. All tables within a pageframe use the same photo dimensions which are specified for the dominant dataTable of the pageframe (the table with inline rows).

Data Table Row Class

[row element].dbiScriptProperties{properties}
[data table element].dbiScriptProperties.rows{properties}
app.dbiScriptProperties.dataTables.rows{properties}

.deletes.allowWithoutConfirm

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

When .deletes.allowWithoutConfirm is true, the delete row dialog box includes a Don’t ask again checkbox.

This property is ignored if .deletes.confirm is false.

.deletes.confirm

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

When .deletes.confirm is true, the user is prompted to confirm every row delete.

.drilldown.style.caption.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.caption.all to specify a caption style that is consistent for all drilldown rows.

For data-dependent caption styling, see the data-driven drilldownCaptionStyle function.

.drilldown.style.caption.display.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.caption.display.all to specify a caption style that is consistent for all drilldown display rows.

This property is ignored if .drilldown.style.caption.all is specified.

For data-dependent caption styling, see the data-driven drilldownCaptionStyle function.

.drilldown.style.caption.display.even

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.caption.display.even to specify a caption style for even numbered drilldown display rows.

This property is ignored if .drilldown.style.caption.all or .drilldown.style.caption.display.all are specified.

For data-dependent caption styling, see the data-driven drilldownCaptionStyle function.

.drilldown.style.caption.display.odd

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.caption.display.odd to specify a caption style for odd numbered drilldown display rows.

This property is ignored if .drilldown.style.caption.all or .drilldown.style.caption.display.all are specified.

For data-dependent caption styling, see the data-driven drilldownCaptionStyle function.

.drilldown.style.caption.display.selected

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.caption.display.selected to specify a caption style for the selected drilldown display row.

This property overrides .drilldown.style.caption.display.even and .drilldown.style.caption.display.odd.

This property is ignored if .drilldown.style.caption.all or .drilldown.style.caption.display.all are specified.

For data-dependent caption styling, see the data-driven drilldownCaptionStyle function.

.drilldown.style.caption.edit.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.caption.edit.all to specify a caption style that is consistent for all drilldown edit rows.

This property is ignored if .drilldown.style.caption.all is specified.

For data-dependent caption styling, see the data-driven drilldownCaptionStyle function.

.drilldown.style.caption.edit.even

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.caption.edit.even to specify a caption style for even numbered drilldown edit rows.

This property is ignored if .drilldown.style.caption.all or .drilldown.style.caption.edit.all are specified.

For data-dependent caption styling, see the data-driven drilldownCaptionStyle function.

.drilldown.style.caption.edit.odd

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.caption.edit.odd to specify a caption style for odd numbered drilldown edit rows.

This property is ignored if .drilldown.style.caption.all or .drilldown.style.caption.edit.all are specified.

For data-dependent caption styling, see the data-driven drilldownCaptionStyle function.

.drilldown.style.caption.edit.selected

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.caption.edit.selected to specify a caption style for the selected drilldown edit row.

This property overrides .drilldown.style.caption.edit.even and .drilldown.style.caption.edit.odd.

This property is ignored if .drilldown.style.caption.all or .drilldown.style.caption.edit.all are specified.

For data-dependent caption styling, see the data-driven drilldownCaptionStyle function.

.drilldown.style.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.all to specify a style that is consistent for all drilldown rows.

For data-dependent styling, see the data-driven drilldownStyle function.

.drilldown.style.display.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.display.all to specify a style that is consistent for all drilldown display rows.

This property is ignored if .drilldown.style.all is specified.

For data-dependent styling, see the data-driven drilldownStyle function.

.drilldown.style.display.even

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.display.even to specify a style for even numbered drilldown display rows.

This property is ignored if .drilldown.style.all or .drilldown.style.display.all are specified.

For data-dependent styling, see the data-driven drilldownStyle function.

.drilldown.style.display.odd

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.display.odd to specify a style for odd numbered drilldown display rows.

This property is ignored if .drilldown.style.all or .drilldown.style.display.all are specified.

For data-dependent styling, see the data-driven drilldownStyle function.

.drilldown.style.display.selected

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.display.selected to specify a style for the selected drilldown display row.

This property overrides .drilldown.style.display.even and .drilldown.style.display.odd.

This property is ignored if .drilldown.style.all or .drilldown.style.display.all are specified.

For data-dependent styling, see the data-driven drilldownStyle function.

.drilldown.style.edit.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.edit.all to specify a style that is consistent for all drilldown edit rows.

This property is ignored if .drilldown.style.all is specified.

For data-dependent styling, see the data-driven drilldownStyle function.

.drilldown.style.edit.even

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.edit.even to specify a style for even numbered drilldown edit rows.

This property is ignored if .drilldown.style.all or .drilldown.style.edit.all are specified.

For data-dependent styling, see the data-driven drilldownStyle function.

.drilldown.style.edit.odd

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.edit.odd to specify a style for odd numbered drilldown edit rows.

This property is ignored if .drilldown.style.all or .drilldown.style.edit.all are specified.

For data-dependent styling, see the data-driven drilldownStyle function.

.drilldown.style.edit.selected

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .drilldown.style.edit.selected to specify a style for the selected drilldown edit row.

This property overrides .drilldown.style.edit.even and .drilldown.style.edit.odd.

This property is ignored if .drilldown.style.all or .drilldown.style.edit.all are specified.

For data-dependent styling, see the data-driven drilldownStyle function.

Data Table Field Class

[field element]{properties}
[data table element].dbiScriptProperties.fields.[field type]{properties}
app.dbiScriptProperties.dataTables.fields.[field type]{properties}
[boolean field element].falseIsBlank
inherits from
[table element].dbiScriptProperties.fields.boolean.falseIsBlank
which inherits from
app.dbiScriptProperties.fields.boolean.falseIsBlank
var o = app.gui.appendDataTable("table1","Table 1");
o.dbiScriptProperties.fields.boolean.falseIsBlank = true;
var o = app.gui.appendDataTable("table1","Table 1");
o.appendBoolean("field1","Field 1",{falseIsBlank:true});

Field Classes (A - M)

Aggregate

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.aggregate{properties}
app.dbiScriptProperties.dataTables.fields.aggregate{properties}
[table element].appendAggregate

.decimals

Data TypeAcceptable ValuesDefault Value
Integer0+0

The .decimals property specifies the fixed number of decimals to display for the Aggregate value.

AggregateMoney

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.aggregateMoney{properties}
app.dbiScriptProperties.dataTables.fields.aggregateMoney{properties}
[table element].appendAggregateMoney

.decimals

Data TypeAcceptable ValuesDefault Value
Integer0+2

The .decimals property specifies the fixed number of decimals to display for the AggregateMoney value.

.moneySymbol

Data TypeAcceptable ValuesDefault Value
StringNon-zero length string"$"

The symbol used to indicate the currency of the value.

AjaxButton

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.ajaxButton{properties}
app.dbiScriptProperties.dataTables.fields.ajaxButton{properties}
[table element].appendAjaxButton

.attemptsToMake

Data TypeAcceptable ValuesDefault Value
Integer1 – 102

The .attemptsToMake property specifies the maximum number of attempts to retrieve data from the server. Server errors will not be reported unless the error occurs during the final attempt.

.caption

Data TypeAcceptable ValuesDefault Value
StringNon-zero length string"Send"

This property specifies the text of the input button’s caption.

.fileName

Data TypeAcceptable ValuesDefault Value
StringAny string"result.txt"

This property only applies to AjaxButton fields of type "file". It specifies the name of the file that will be downloaded by the browser.

.httpMethod

Data TypeAcceptable ValuesDefault Value
String"GET", "POST""POST"

The .httpMethod property specifies the HTTP method to use when communicating with the server. The "GET" method sends the name/value pair query strings in the URL of the GET request. The "POST" method sends the name/value pair query strings in the HTTP message body of the POST request.

.jsonp

Data TypeAcceptable ValuesDefault Value
StringAny string"jsonp"

This property only applies to AjaxButton fields of type "jsonp". It specifies the name of the callback or "padding" function passed to the server. This function will not be used by dbiScript and is stripped off in order to return only the json value.

.millisecondsBetweenAttempts

Data TypeAcceptable ValuesDefault Value
Integer0 – 10000500

This property specifies the number milliseconds to wait between attempting to retrieve data from the server.

.sendEmptyValues

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Set .sendEmptyValues to true if you want empty values returned in the object of the field’s data-driven calculateHttpData function to be included in the query string / post to the server. By default, empty values are stripped before the data is sent. Empty values include undefined, null and NaN values, empty strings ("") and strings which consist of only spaces (i.e. " "). If .sendEmptyValues is true, empty values are sent as an empty string ("").

.serverErrorDisplay

Data TypeAcceptable ValuesDefault Value
String"screen", "console", "suppress""screen"

This property specifies where sever errors should be displayed. The "screen" setting indicates that errors should be displayed in a messagebox in the browser. The "console" setting indicates that errors should be logged to the console. The "suppress" setting indicates that no messages should be displayed.

.type

Data TypeAcceptable ValuesDefault Value
String"csv", "file", "json", "jsonp", "string", "xmlString", "xml", "xmlEmbedded""string"

The .type property specifies the format of the data returned by the server. The following table explains each setting:

SettingDescription
"csv"

The server returns data in comma-separated value format. Data is passed to the field’s data-driven processResponse function as an array of arrays in the format:

[ [ A1 , B1 , C1 , … ] , [ A2 , B2 , C2 , … ] , [ A3 , B3 , C3 , … ] , … ]

Where A1 refers to the value in the first column ("A") and first row ("1") of the file, etc.
If the server will return a single value, specify the "string" type instead.

"file"The server returns a file which is downloaded by the user’s browser. Specify the file name with the field’s .fileName property. The processResponse data-driven function is not called with AjaxButtons of .type "file".
"json"The server returns data as a JSON (JavaScript Object Notation) object. The object is passed directly to the field’s data-driven processResponse function.
"jsonp"The server returns a function call containing the data in JSON format. The function call will not be used by dbiScript and will be stripped off. The JSON data is passed directly to the field’s data-driven processResponse function.
"string"The server returns a single string value which is passed directly to the field’s data-driven processResponse function.
"tsv"The server returns data in tab-separated value format. The data is processed in the same manner as for the "csv" WebServiceRequest type.
If the server will return a single value, specify the "string" type instead.
"xml"The server returns an XML document containing the return data. The data is converted into a JSON object and passed to the field’s data-driven processResponse function.
"xmlEmbedded"The server returns the data as an XML document embedded within another XML document. The data is converted into a JSON object and passed to the field’s data-driven processResponse function.
"xmlString"The server returns a single string value contained in an XML wrapper. The string is parsed from the XML container and passed to the field’s data-driven processResponse function.

To inspect the data returned by the server, use console.log as per the following example:

function client_stockPrice_processResponse(o){ console.log(o); }

Boolean

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.boolean{properties}
app.dbiScriptProperties.dataTables.fields.boolean{properties}
[table element].appendBoolean
MS SQL Server, MS Access, SQL Anywhere:
[table element].appendData
where field data type is BIT (Yes/No in MS Access)

.falseIsBlank

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Only applies if the database field does not allow null or .isRequired is true. When .falseIsBlank is set to true, the field value of false is represented by [ Blank ] instead of [ Boolean False ].

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is false, the user will have three options to choose from ([ Blank ], [ Boolean False ] and [ Boolean True ]) whereas if .isRequired is true there will only be two options. If .isRequired is true, the field value of false is represented by either [ Blank ] or [ Boolean False ] depending on the value of .falseIsBlank. If .isRequired is true and the database column does support null values, the [Blank] value will be displayed for any existing field values which are null.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.values

Data TypeAcceptable ValuesDefault Value
2 Element Array of Integers[0+,0+][0,1]
2 Element Array of Strings[String,String] 

This property applies to Boolean columns added via the .appendBoolean table function and attached to integer or char columns; it has no effect on columns defined as type Boolean or Bit in the database (SQL Server, Access, MySQL, PostgreSQL support the Boolean/Bit data type). The first element of the array indicates the value to store / interpret as false while the second element indicates the value for true. Any other value returned from the database will be interpreted as undefined / NULL.

Notes:

  • For an existing database which contains "F" for false values and "T" for true values, specify ["F","T"]
  • For an existing database which contains "N" for false values and "Y" for true values, specify ["N","Y"]

Button

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.button{properties}
app.dbiScriptProperties.dataTables.fields.button{properties}
[table element].appendButton

.caption

Data TypeAcceptable ValuesDefault Value
StringNon-zero length string"Click"

This property specifies the text of the input button’s caption.

CopyButton

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.copyButton{properties}
app.dbiScriptProperties.dataTables.copyButton{properties}
[table element].appendCopyButton

.caption

Data TypeAcceptable ValuesDefault Value
StringNon-zero length string"Click"

This property specifies the text of the input button’s caption.

Datetime

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.datetime{properties}
app.dbiScriptProperties.dataTables.datetime{properties}
[table element].appendData
where field data type is DATETIME or TIMESTAMP

.forceCase

Data TypeAcceptable ValuesDefault Value
String"", "lower", "UPPER""" (do not force case)

Only affects the displayed value of the datetime.

.hasSpinner

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .hasSpinner is true, controls for incrementing and decrementing the time portion of the field’s value appear above and below the time input, respectively.

This property is ignored if .showTime is false.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to enter a valid datetime before the row can be saved.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.isUnique

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isUnique is true, the field value must be unique to the table, within the current foreign keys (entire table if the table does not have foreign keys); the user will not be able to save the row if another row exists with the same value.

.showSeconds

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

This property specifies whether or not to display the seconds portion of the datetime value. If .showSeconds is false, the user will be unable to enter seconds in edit mode.

This property is ignored if .showTime is false.

.showTime

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

This property specifies whether or not to display the time portion of the datetime value. If .showTime is false, the user will be unable to enter the time in edit mode and the stored time portion of the datetime value will always be midnight (12:00:00.0 AM).

.showTimeZone

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

This property specifies whether or not to display the datetime value’s timezone.

This property is ignored if .storeUTC is true or if the database column does not support timezones.

.storeUTC

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

Only applies to datetime fields for which .showTime is true. When .storeUTC is true, the displayed datetime value is converted to the local (user’s) time zone and the stored value is converted to UTC (Coordinated Universal Time). If .storeUTC is false, the stored value will include the local (user’s) timezone if the database column supports timezones.

Drilldown

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.drilldown{properties}
app.dbiScriptProperties.dataTables.fields.drilldown{properties}
[drilldown element].appendAge
[drilldown element].appendAggregate
[drilldown element].appendAggregateMoney
[drilldown element].appendAjaxButton
[drilldown element].appendBoolean
[drilldown element].appendButton
[drilldown element].appendCopyButton
[drilldown element].appendData
[drilldown element].appendEmail
[drilldown element].appendFileVault
[drilldown element].appendIconlist
[drilldown element].appendMemo
[drilldown element].appendMoney
[drilldown element].appendMoveButton
[drilldown element].appendPercentage
[drilldown element].appendPicklist
[drilldown element].appendQuickpick
[drilldown element].appendRadio
[drilldown element].appendRowState
[drilldown element].appendReference
[drilldown element].appendSelect
[drilldown element].appendTreeview
[drilldown element].appendURL
[drilldown element].appendWebServiceRequest

.style.caption.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.caption.all to specify a style that is consistent for all drilldown fields.

For data-dependent styling, see the data-driven captionStyle function.

.style.caption.display.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.caption.display.all to specify a style that is consistent for all drilldown display fields.

This property is ignored if .style.caption.all is specified.

For data-dependent styling, see the data-driven captionStyle function. Note that dbiScript normally styles the drilldown display field caption’s font color as grey if the field value is empty or black if it is not. Use the data-driven captionStyle function if you wish to emulate this behavior with, say, different colors.

.style.caption.display.even

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.caption.display.even to specify a style for drilldown fields on even numbered display rows.

This property is ignored if .style.caption.all or .style.caption.display.all are specified.

For data-dependent styling, see the data-driven captionStyle function. Note that dbiScript normally styles the drilldown display field caption’s font color as grey if the field value is empty or black if it is not. Use the data-driven captionStyle function if you wish to emulate this behavior with, say, different colors.

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.caption.display.odd to specify a style for drilldown fields on odd numbered display rows.

This property is ignored if .style.caption.all or .style.display.caption.all are specified.

For data-dependent styling, see the data-driven captionStyle function. Note that dbiScript normally styles the drilldown display field caption’s font color as grey if the field value is empty or black if it is not. Use the data-driven captionStyle function if you wish to emulate this behavior with, say, different colors.

.style.caption.display.selected

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.caption.display.selected to specify a style for drilldown fields on the selected display row.

This property overrides .style.caption.display.even and .style.caption.display.odd.

This property is ignored if .style.caption.all or .style.caption.display.all are specified.

For data-dependent styling, see the data-driven captionStyle function. Note that dbiScript normally styles the drilldown display field caption’s font color as grey if the field value is empty or black if it is not. Use the data-driven captionStyle function if you wish to emulate this behavior with, say, different colors.

.style.caption.edit.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.caption.edit.all to specify a style that is consistent for all drilldown edit fields.

This property is ignored if .style.caption.all is specified.

For data-dependent styling, see the data-driven captionStyle function.

.style.caption.edit.even

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.caption.edit.even to specify a style for drilldown fields on even numbered edit rows.

This property is ignored if .style.caption.all or .style.caption.edit.all are specified.

For data-dependent styling, see the data-driven captionStyle function.

.style.caption.edit.odd

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.caption.edit.odd to specify a style for drilldown fields on odd numbered edit rows.

This property is ignored if .style.caption.all or .style.caption.edit.all are specified.

For data-dependent styling, see the data-driven captionStyle function.

.style.caption.edit.selected

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.caption.edit.selected to specify a style for drilldown fields on the selected edit row.

This property overrides .style.caption.edit.even and .style.caption.edit.odd.

This property is ignored if .style.caption.all or .style.caption.edit.all are specified.

For data-dependent styling, see the data-driven captionStyle function.

.style.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.all to specify a style that is consistent for all drilldown fields.

For data-dependent styling, see the data-driven field style function.

.style.display.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.display.all to specify a style that is consistent for all drilldown display fields.

This property is ignored if .style.all is specified.

For data-dependent styling, see the data-driven field style function.

.style.display.even

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.display.even to specify a style for drilldown fields on even numbered display rows.

This property is ignored if .style.all or .style.display.all are specified.

For data-dependent styling, see the data-driven field style function.

.style.display.odd

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.display.odd to specify a style for drilldown fields on odd numbered display rows.

This property is ignored if .style.all or .style.display.all are specified.

For data-dependent styling, see the data-driven field style function.

.style.display.selected

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.display.selected to specify a style for drilldown fields on the selected display row.

This property overrides .style.display.even and .style.display.odd.

This property is ignored if .style.all or .style.display.all are specified.

For data-dependent styling, see the data-driven field style function.

.style.edit.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.edit.all to specify a style that is consistent for all drilldown edit fields.

This property is ignored if .style.all is specified.

For data-dependent styling, see the data-driven field style function.

.style.edit.even

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.edit.even to specify a style for drilldown fields on even numbered edit rows.

This property is ignored if .style.all or .style.edit.all are specified.

For data-dependent styling, see the data-driven field style function.

.style.edit.odd

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.edit.odd to specify a style for drilldown fields on odd numbered edit rows.

This property is ignored if .style.all or .style.edit.all are specified.

For data-dependent styling, see the data-driven field style function.

.style.edit.selected

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.edit.selected to specify a style for drilldown fields on the selected edit row.

This property overrides .style.edit.even and .style.edit.odd.

This property is ignored if .style.all or .style.edit.all are specified.

For data-dependent styling, see the data-driven field style function.

Email

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.email{properties}
app.dbiScriptProperties.dataTables.fields.email{properties}
[table element].appendEmail

.bcc

Data TypeAcceptable ValuesDefault Value
StringAny string""

Clicking on an email address listed in a table Email column will create a new email message through the user’s email client. The bcc of the new email message will be populated with the value of this property. Note that the email’s bcc can also be specified dynamically with the Email field’s data-driven setBCC function.

.body

Data TypeAcceptable ValuesDefault Value
StringAny string""

Clicking on an email address listed in a table Email column will create a new email message through the user’s email client. The body of the new email message will be populated with the value of this property. Note that the email’s body can also be specified dynamically with the Email field’s data-driven setBody function.

.cc

Data TypeAcceptable ValuesDefault Value
StringAny string""

Clicking on an email address listed in a table Email column will create a new email message through the user’s email client. The cc of the new email message will be populated with the value of this property. Note that the email’s cc can also be specified dynamically with the Email field’s data-driven setCC function.

.forceValid

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Whenever an email field’s row is saved, the entered email address is tested against an email testing regular expression. If the field’s value is non-empty and it fails the test, the user will be presented with either a validation error or a verification message depending on whether .forceValid is true or false, respectively. The validation error is "Invalid email address" and the verification message is "Does not appear to be a valid email address". If .forceValid is true, the row cannot be saved if the field value fails the email address test.

Email addresses are complex and while the email address test is quite robust it should not be considered definitive. If .forceValid is true and validation is preventing your users from entering email addresses that are known to be valid, you should set .forceValid to false. When .forceValid is false, the users will still be warned if the email address appears to be invalid. Forced validation can also be handled in the field’s data-driven validate function.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to enter a non-empty string before the row can be saved. If .isRequired is false an empty field value will be stored either as null if the database column allows nulls or an empty string if it does not. Note that setting .isRequired to true will only force your users to enter a non-empty string; if you wish to force the entry of a valid email address then you must also set .forceValid to true.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.isUnique

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isUnique is true, the field value must be unique to the table, within the current foreign keys (entire table if the table does not have foreign keys); the user will not be able to save the row if another row exists with the same value.

.subject

Data TypeAcceptable ValuesDefault Value
StringAny string""

Clicking on an email address listed in a table Email column will create a new email message through the user’s email client. The subject of the new email message will be populated with the value of this property. Note that the email’s subject can also be specified dynamically with the Email field’s data-driven setSubject function.

FileVault

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.fileVault{properties}
app.dbiScriptProperties.dataTables.fields.fileVault{properties}
[table element].appendFileVault

.deletes.allowWithoutConfirm

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

When .deletes.allowWithoutConfirm is true, the delete file dialog box includes a Don’t ask again checkbox. This property is ignored if .deletes.confirm is false.

.deletes.confirm

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

When .deletes.confirm is true, the user is prompted to confirm every file delete.

.displayFileName

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

This property specifies whether or not the fileVault field displays the file name in the GUI.

File names are always displayed if the fileVault field is virtual (not tied to a column in the data table).

.forceCase

Data TypeAcceptable ValuesDefault Value
String"", "lower", "UPPER""" (do not force case)

Only applies to the description field of the fileVault. The fileVault will only have a description if the field exists in the database.

.forcedFileName

Data TypeAcceptable ValuesDefault Value
StringNon-zero length stringNone

If .forcedFileName is specified, uploaded files will be renamed to this value but they will retain their original extension. For example, if "test.txt" is uploaded and .forcedFileName = "Notes", the name of the file stored on the server will be "Notes.txt".

This property does not affect the displayed file name of existing files on the server.

Do not include the file extension in .forcedFileName.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isRequired is true, the user will be forced to upload a file before the row can be saved.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.lockDescriptionWhenCheckedOut

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .lockDescriptionWhenCheckedOut is true, the file description cannot be edited while the file is checked out.

This property is ignored for virtual fileVault fields (not tied to a column in the database).

.maintainActionHistory

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .maintainActionHistory is true, a new row is added to the file table whenever a file is uploaded or checked in or out. If .maintainActionHistory is false, only the details of the last file action will be maintained in the file table.

.maintainFileHistory

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .maintainFileHistory is true, the file folder on the server will contain a subfolder named "history". Whenever a new file is uploaded, the old file will be moved to the history folder and the datetime it was moved will be prepended in the format "yyyy-mm-dd hh.nn.ss". For example, "test.txt" might be renamed "2010 12 31 23.59.59 test.txt".

.restrictFileTypes

Data TypeAcceptable ValuesDefault Value
Array of StringsNon-zero length string(s)None

If .restrictFileTypes is specified, only files with an extension which appears in the .restrictFileTypes array can be uploaded.

Iconlist

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.iconlist{properties}
app.dbiScriptProperties.dataTables.fields.iconlist{properties}
[table element].appendIconlist

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.sprites

Data TypeAcceptable ValuesDefault Value
ObjectSee example belownone

The .sprites property specifies the positioning and dimensions of a group of sprite images within a sprite sheet. The name of the sprite sheet image must be listed within the images parameter (parameter 4) of the iconlist field. Note that this parameter is inherited; if your dbiScript application uses multiple sprite sheets, they may be specified in app.dbiScriptProperties.dataTables.fields.iconlist.sprites. Only those sprite sheets listed in the field’s

Sprite Example
{"sprites.png":[[-5,-5,16,16],[-31,-5,16,16],[-5,-31,16,16],[-31,-31,16,16]]}

Each parameter name in the object specifies an image (sprite sheet) name. The parameter value specifies an array of arrays. Each array within the parameter value array specifies the location and dimensions of one sprite within the sprite sheet. The individual sprite arrays specify these four css properties (in pixels) of the sprite:

[ background-position-x, background-position-y, width, height ]

Creating a Sprite Sheet

Stitches is an excellent sprite sheet generator, provided by Matthew Cobbs.

Instructions for "Stitches":

  1. Click Clear
  2. Drag & drop your files onto the page
  3. Click Downloads
  4. Click Sprite sheet
  5. Click Stylesheet
  6. Use the values from the Stylesheet to create your .sprites object

Icon Indexes with Sprite Sheets

The icons displayed by the icons field are specified by index. The icon indexes are assigned in the order the images are specified in the field’s images parameter. When a sprite sheet is specified, indexes are assigned to each sprite within the sprite sheet before the counter moves on to the next image in the field’s image parameter.

.type

Data TypeAcceptable ValuesDefault Value
String"dynamic", "allstatic", "static""dynamic"
Property ValueDescription
"dynamic"Only selected icons are displayed. Icons can be reordered.
"allstatic"All icons are displayed. Unselected icons are translucent. Icons cannot be reordered.
"static"Only selected icons are displayed. Unselected icons are translucent. Icons cannot be reordered.

Inline

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.inline{properties}
app.dbiScriptProperties.dataTables.fields.inline{properties}
[table element].appendAge
[table element].appendAggregate
[table element].appendAggregateMoney
[table element].appendAjaxButton
[table element].appendBoolean
[table element].appendButton
[table element].appendCopyButton
[table element].appendData
[table element].appendEmail
[table element].appendFileVault
[table element].appendIconlist
[table element].appendMemoPreview
[table element].appendMoney
[table element].appendMoveButton
[table element].appendPercentage
[table element].appendQuickpick
[table element].appendRadio
[table element].appendRowState
[table element].appendReference
[table element].appendSelect
[table element].appendTreeview
[table element].appendURL
[table element].appendWebServiceRequest

.editSize

Data TypeAcceptable ValuesDefault Value
String"columnWidth", "fieldWidth""columnWidth"
Property ValueDescription
"columnWidth"The width of the edit input element is the same as the column width before the row was edited.
"fieldWidth"The input element’s size property is set to the size of the field in the database.

In either case, the input element will auto-expand as the user types to display the entire text value of the element.

.style.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.all to specify a style that is consistent for all inline fields.

For data-dependent styling, see the data-driven field style function.

.style.display.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.display.all to specify a style that is consistent for all inline display fields.

This property is ignored if .style.all is specified.

For data-dependent styling, see the data-driven field style function.

.style.display.even

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.display.even to specify a style for inline fields on even numbered display rows.

This property is ignored if .style.all or .style.display.all are specified.

For data-dependent styling, see the data-driven field style function.

.style.display.odd

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.display.odd to specify a style for inline fields on odd numbered display rows.

This property is ignored if .style.all or .style.display.all are specified.

For data-dependent styling, see the data-driven field style function.

.style.display.selected

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.display.selected to specify a style for inline fields on the selected display row.

This property overrides .style.display.even and .style.display.odd.

This property is ignored if .style.all or .style.display.all are specified.

For data-dependent styling, see the data-driven field style function.

.style.edit.all

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.edit.all to specify a style that is consistent for all inline edit fields.

This property is ignored if .style.all is specified.

For data-dependent styling, see the data-driven field style function.

.style.edit.even

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.edit.even to specify a style for inline fields on even numbered edit rows.

This property is ignored if .style.all or .style.edit.all are specified.

For data-dependent styling, see the data-driven field style function.

.style.edit.odd

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.edit.odd to specify a style for inline fields on odd numbered edit rows.

This property is ignored if .style.all or .style.edit.all are specified.

For data-dependent styling, see the data-driven field style function.

.style.edit.selected

Data TypeAcceptable ValuesDefault Value
ObjectHTML DOM stylingNone

Use .style.edit.selected to specify a style for inline fields on the selected edit row.

This property overrides .style.edit.even and .style.edit.odd.

This property is ignored if .style.all or .style.edit.all are specified.

For data-dependent styling, see the data-driven field style function.

Memo

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.memo{properties}
app.dbiScriptProperties.dataTables.fields.memo{properties}
[drilldown element].appendMemo
[drilldown element].appendData
where field data type is CHAR, VARCHAR or a variant / subtype thereof
and
field size is >= [string field element].forceMemoFieldSize

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to enter a non-empty string before the row can be saved. If .isRequired is false an empty field value will be stored either as null if the database column allows nulls or an empty string if it does not.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Within dbiScript, memo fields are string fields that have either been forced to memo or are longer than the [string field element].forceMemoFieldSize property of their parent table. In order for your users to be able to sort a table’s data by a memo field, your data provider must support sorting of queries by columns of the memo field data type and this property must be true. Note that the default value for [memo field element].isSortable is false (The default .isSortable value is true for all other field types which support it).

The following table lists the provider-specific data types for which query sorts are not supported:

Data ProviderSort - Unsupported Data Types
OracleLONG, LONG VARCHAR
DB2VARGRAPHIC, LONG VARGRAPHIC
SQL ServerIMAGE, TEXT, NTEXT, XML
AccessIMAGE, LONG BINARY
MySQLNo unsupported data types
PostgreSQLACLITEM, BOX, CID, CIRCLE, LINE, LSEG, OID, PATH, POINT, POLYGON, REFCURSOR, SMGR, UNKNOWN, XID, XML
SQL AnywhereNo unsupported data types
  • Create an index on every sortable field in your database

.rows

Data TypeAcceptable ValuesDefault Value
Integer1+4

This property specifies the number of rows to display in the memo’s textarea.

MemoPreview

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.memoPreview{properties}
app.dbiScriptProperties.dataTables.fields.memoPreview{properties}
[table element].appendMemoPreview
[table element].appendData
where field data type is CHAR, VARCHAR or a variant / subtype thereof
and
field size is >= [string field element].forceMemoFieldSize

.displaySize

Data TypeAcceptable ValuesDefault Value
Integer5 – 5030

This property specifies the value of the size property of the inline read-only input element which previews the memo field value.

Money

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.money{properties}
app.dbiScriptProperties.dataTables.fields.money{properties}
[table element].appendMoney
[table element].appendData
where field data type is CURRENCY, MONEY or a variant / subtype thereof

.decimals

Data TypeAcceptable ValuesDefault Value
Integer0+2

The .decimals property specifies the fixed number of decimals to display for the Money value. Entered values are rounded to the specified number of decimals before the value is saved.

* Important note for MS Access databases: A field’s Decimal Places setting cannot be retrieved by dbiScript. Therefore, if you need to specify the number of decimals for a field, you must do so through dbiScript.

.editSize

Data TypeAcceptable ValuesDefault Value
Integer1+Data-type dependent

This property specifies the width of the edit input in terms of number of characters to display. The default size is dependent on the field’s .maxValue and .decimals settings – it’s set wide enough to generally display the maximum and minimum values with all decimals, however the default value allows for no more than 10 digits in the whole part of the maximum value. This property can be increased to allow for more space but it cannot be decreased from the default value. If the field’s edit input appears to be too wide, consider decreasing .maxValue or .decimals.

.hasSpinner

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .hasSpinner is true, controls for incrementing and decrementing the field’s value appear above and below the edit input, respectively. The spinner will not increment the field’s value beyond .maxValue nor will it decrement it below .minValue.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to enter a money value before the row can be saved.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.isUnique

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isUnique is true, the field value must be unique to the table, within the current foreign keys (entire table if the table does not have foreign keys); the user will not be able to save the row if another row exists with the same value.

.maxValue

Data TypeAcceptable ValuesDefault Value
NumberAny numberData-type dependent

The default .maxValue is determined by the maximum allowable value of the field’s data type in the database. If .maxValue is specified and is less than the default value, then the specified value will be used. If .maxValue is specified and is greater than the default value, the default value will be used. If the user enters a value greater than .maxValue into the field, a validation error will be displayed when the user attempts to save the row.

.minValue

Data TypeAcceptable ValuesDefault Value
NumberAny numberData-type dependent

The default .minValue is determined by the minimum allowable value of the field’s data type in the database. If .minValue is specified and is greater than the default value, then the specified value will be used. If .minValue is specified and is less than the default value, the default value will be used. If the user enters a value less than .minValue into the field, a validation error will be displayed when the user attempts to save the row.

.moneySymbol

Data TypeAcceptable ValuesDefault Value
StringNon-zero length string"$"

The symbol used to indicate the currency of the value.

MoveButton

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.moveButton{properties}
app.dbiScriptProperties.dataTables.fields.moveButton{properties}
[table element].appendMoveButton

.caption

Data TypeAcceptable ValuesDefault Value
StringNon-zero length string"Click"

This property specifies the text of the input button’s caption.

Field Classes (N - W)

Number

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.number{properties}
app.dbiScriptProperties.dataTables.fields.number{properties}
[table element].appendData
where field data type is INTEGER, DECIMAL, DOUBLE, FLOAT, NUMERIC, REAL, SINGLE or a variant / subtype thereof (e.g. TINYINT)

.decimals

Data TypeAcceptable ValuesDefault Value
Integer0+2

The .decimals property only applies to non-integer numeric fields.

When the field’s .decimalsAreFixed setting is false, the .decimals property specifies the minimum number of decimals to display for the field. If the stored field value contains more decimals than the specified .decimals setting, then the stored value will be displayed. Entered values are not rounded.

When the field’s .decimalsAreFixed setting is true, the .decimals property specifies the fixed number of decimals to display for the Number value. Entered values are rounded to the specified number of decimals before the value is saved.

* Important note for MS Access databases: A field’s Decimal Places setting cannot be retrieved by dbiScript. Therefore, if you need to specify the number of decimals for a field, you must do so through dbiScript.

.decimalsAreFixed

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

The .decimalsAreFixed property only applies to non-integer numeric fields.

The effect of the .decimalsAreFixed property on the behavior of the field is outlined in the .decimals property.

.editSize

Data TypeAcceptable ValuesDefault Value
Integer1+Data-type dependent

This property specifies the width of the edit input in terms of number of characters to display. The default size is dependent on the field’s .maxValue and .decimals settings – it’s set wide enough to generally display the maximum and minimum values with all decimals, however the default value allows for no more than 10 digits in the whole part of the maximum value. This property can be increased to allow for more space but it cannot be decreased from the default value. If the field’s edit input appears to be too wide, consider decreasing .maxValue or .decimals.

.hasSpinner

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .hasSpinner is true, controls for incrementing and decrementing the field’s value appear above and below the edit input, respectively. The spinner will not increment the field’s value beyond .maxValue nor will it decrement it below .minValue.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to enter a numeric value before the row can be saved.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.isUnique

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isUnique is true, the field value must be unique to the table, within the current foreign keys (entire table if the table does not have foreign keys); the user will not be able to save the row if another row exists with the same value.

.maxValue

Data TypeAcceptable ValuesDefault Value
NumberAny numberData-type dependent

The default .maxValue is determined by the maximum allowable value of the field’s data type in the database. If .maxValue is specified and is less than the default value, then the specified value will be used. If .maxValue is specified and is greater than the default value, the default value will be used. If the user enters a value greater than .maxValue into the field, a validation error will be displayed when the user attempts to save the row.

.minValue

Data TypeAcceptable ValuesDefault Value
NumberAny numberData-type dependent

The default .minValue is determined by the minimum allowable value of the field’s data type in the database. If .minValue is specified and is greater than the default value, then the specified value will be used. If .minValue is specified and is less than the default value, the default value will be used. If the user enters a value less than .minValue into the field, a validation error will be displayed when the user attempts to save the row.

Percentage

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.money{properties}
app.dbiScriptProperties.dataTables.fields.money{properties}
[table element].appendPercentage

.decimals

Data TypeAcceptable ValuesDefault Value
Integer0+0

The .decimals property specifies the fixed number of decimals to display for the Percentage value. Entered values are rounded to the specified number of decimals before the value is saved.

* Important note for MS Access databases: A field’s Decimal Places setting cannot be retrieved by dbiScript. Therefore, if you need to specify the number of decimals for a field, you must do so through dbiScript.

.editSize

Data TypeAcceptable ValuesDefault Value
Integer1+Data-type dependent

This property specifies the width of the edit input in terms of number of characters to display. The default size is dependent on the field’s .maxValue and .decimals settings – it’s set wide enough to generally display the maximum and minimum values with all decimals, however the default value allows for no more than 10 digits in the whole part of the maximum value. This property can be increased to allow for more space but it cannot be decreased from the default value. If the field’s edit input appears to be too wide, consider decreasing .maxValue or .decimals.

.hasSpinner

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .hasSpinner is true, controls for incrementing and decrementing the field’s value appear above and below the edit input, respectively. The spinner will not increment the field’s value beyond .maxValue nor will it decrement it below .minValue.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to enter a money value before the row can be saved.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.isUnique

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isUnique is true, the field value must be unique to the table, within the current foreign keys (entire table if the table does not have foreign keys); the user will not be able to save the row if another row exists with the same value.

.maxValue

Data TypeAcceptable ValuesDefault Value
NumberAny numberData-type dependent

The default .maxValue is determined by the maximum allowable value of the field’s data type in the database. If .maxValue is specified and is less than the default value, then the specified value will be used. If .maxValue is specified and is greater than the default value, the default value will be used. If the user enters a value greater than .maxValue into the field, a validation error will be displayed when the user attempts to save the row.

The .maxValue refers to the maximum stored value. For example, a .maxValue of 25% would be specified as 0.25.

.minValue

Data TypeAcceptable ValuesDefault Value
NumberAny numberData-type dependent

The default .minValue is determined by the minimum allowable value of the field’s data type in the database. If .minValue is specified and is greater than the default value, then the specified value will be used. If .minValue is specified and is less than the default value, the default value will be used. If the user enters a value less than .minValue into the field, a validation error will be displayed when the user attempts to save the row.

The .minValue refers to the maximum stored value. For example, a .minValue of 10% would be specified as 0.1.

Picklist

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.picklist{properties}
app.dbiScriptProperties.dataTables.fields.picklist{properties}
[drilldown element].appendPicklist

.allowNew

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

This property specifies whether or not users can enter new values into the picklist. New picklist values are stored in the field’s definition table.

.dataOrder

Data TypeAcceptable ValuesDefault Value
String"asc", "user""asc"

The sort order of the items selected from the pick list. When .dataOrder is "asc", the selected items will be displayed in ascending alphabetical order. When .dataOrder is "user", the user can set the order of the selected items in the popup Picklist window.

.displayRows

Data TypeAcceptable ValuesDefault Value
Integer2+4

This property specifies the number of rows to display in the field’s display GUI. A vertical scrollbar will appear in the field if the number of elements in the field’s value exceeds .displayRows.

This property is ignored if .type = "string".

.editRows

Data TypeAcceptable ValuesDefault Value
Integer2+4

This property specifies the number of rows to display in the field’s edit GUI. A vertical scrollbar will appear in the field if the number of elements in the field’s value exceeds .editRows.

This property is ignored if .type = "string".

.fixedWidth

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Only applies to picklists of type "table". If this property is true, the width of the picklist display element will be constrained to the value specified for .width (pixels) and any overflow will be hidden.

.forceCase

Data TypeAcceptable ValuesDefault Value
String"", "lower", "UPPER""" (do not force case)

Only applies when adding new items to a picklist.

.headings

Data TypeAcceptable ValuesDefault Value
2 Element Array of Strings[String,String]undefined

This property specifies the headings to display for the lists in the popup Picklist window. If the property is undefined, then the columns will not have headings.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If this property is true, the user will be forced to select at least one item from the picklist before the row can be saved.

.maxItems

Data TypeAcceptable ValuesDefault Value
Integer0+0

This property specifies the maximum number of items the user may select from the list. If the property is 0, then there is no maximum.

.type

Data TypeAcceptable ValuesDefault Value
String"string", "table""string"
Property ValueDescription
"string"The picklist field value is displayed as a comma-delimited string.
"table"The picklist field value is displayed as a single column table.

.width

Data TypeAcceptable ValuesDefault Value
Integer0+200

Only applies to picklists of type "table" where .fixedWidth is true. The width of the picklist display element will be constrained to this value (pixels) and any overflow will be hidden.

Quickpick

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.quickpick{properties}
app.dbiScriptProperties.dataTables.fields.quickpick{properties}
[table element].appendQuickpick

.allowNew

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Only applies to virtual (definition-based) quickpicks. Quickpicks that are tied to a physical database field always allow new entries.

.forceCase

Data TypeAcceptable ValuesDefault Value
String"", "lower", "UPPER""" (do not force case)

Only applies when adding new items to a quickpick.

.ignoreCase

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

This property specifies whether or not the search of existing items should respect the case of the user-entered text. When .allowNew and .ignoreCase are both true and the text of the user entry matches an existing item but the case of one or more letters is different, the existing entry will be used instead of adding a new entry. If .ignoreCase is false, a new entry would be added in this scenario. If allowNew is true and forceCase is "lower" or "UPPER" then ignoreCase is true.

.ignoreCharsDatabase

Data TypeAcceptable ValuesDefault Value
StringAny string""

Only applies to asynchronous quickpicks. Specify .ignoreCharsDatabase only when the quickpick field may contain characters which should be ignored for comparison purposes when retrieving matching rows. For example, if the database field value is "a - b" and "-" is specified for .ignoreCharsDatabase, the example row will be returned by a search for either "a b" or "a - b".

Note that there is a database performance hit for stripping characters out of the search expression; .ignoreCharsDatabase should be specified with care. In Oracle and PostgreSQL, the performance hit is O1 while in IBM DB2, MS Access, MySQL, SQLAnywhere and MS SQL Server the performance hit is ON where N = the number of characters specified.

Note also that multiple spaces in the Quickpick field’s database column are reduced to a single space for comparison purposes.

.ignoreCharsInput

Data TypeAcceptable ValuesDefault Value
StringAny string""

The characters specified in .ignoreCharsInput will be stripped from the search expression before the search is executed. The value typed by the user into the reference field’s input element will not be affected; the characters will only be stripped out before the search is executed on the database.

If the empty string ("") is specified, then no characters will be stripped from the input string.

If the special value "non alphanumeric" is specified then any character which is not an upper- or lower-case character (A-Z or a-z) and is not a digit (0-9) or a space will be stripped from the search expression. If data in a referenced field’s database column contains non-alphanumeric data which should affect the search results (for example, "a - b" should return different results than "a b") then "non alphanumeric" should not be used.

If the specified string begins with a caret ("^") then all non-alphanumeric characters with the exception of the characters in the specified string (excluding the initial caret) will be stripped from the input string. With the previous example, to ignore all non-alphanumeric characters except for the dash, specify "^-" for .ignoreCharsInput.

If any other string is specified than all the characters in the specified string will be stripped out of the input string before the search is executed on the database.

.inputSize

Data TypeAcceptable ValuesDefault Value
Integer5 – 5010

The width in pixels of the quickpick input element. Only applies to drilldown picklists.

.isAsynchronous

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue
Property ValueDescription
trueThe list of matching items is updated from the database via SQL queries as the user types into the quickpick input element.
This type of picklist works best with low-latency network connections.
falseThe entire list is preloaded into the browser. JavaScript regular expressions are used to update the list of matching items as the user types into the quickpick input element.
This type of picklist is a better option on high-latency network connections. The total number of list items will affect performance although lists of 10,000+ items can be preloaded with very little delay on high-bandwidth network connections.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the quickpick is attached to a column in the database and this column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to enter a value before the row can be saved.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.selectSize

Data TypeAcceptable ValuesDefault Value
Integer1 – 208

The number of rows to display in the quickpick select element. This number is also used as the fetch size (the number of matches to return) for searches.

Radio

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.radio{properties}
app.dbiScriptProperties.dataTables.fields.radio{properties}
[table element].appendRadio

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true. If .isRequired is true, the user will be forced to select a value before the row can be saved.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.isUnique

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isUnique is true, the field value must be unique to the table, within the current foreign keys (entire table if the table does not have foreign keys); the user will not be able to save the row if another row exists with the same value.

Reference

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.reference{properties}
app.dbiScriptProperties.dataTables.fields.reference{properties}
[table element].appendReference

.ignoreCase

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

Only applies to reference fields of type "quickpop" or type "quickpick". This property specifies whether or not the search of existing items should respect the case of the user-entered text.

.ignoreCharsDatabase

Data TypeAcceptable ValuesDefault Value
StringAny string""

Only applies to reference fields of type "quickpop" or type "quickpick". Specify .ignoreCharsDatabase only when the referenced fields may contain characters which should be ignored for comparison purposes when retrieving matching rows. For example, if "salutation" is a referenced field and data in the "salutation" database column contains a period (as in "Mr.", "Mrs.", etc.), then "." (or any string containing a period) should be specified for .ignoreCharsDatabase and "non-alphanumeric" or "." (or any string containing a period) should be specified for .ignoreCharsInput. In this example, the advantage of specifying "." in .ignoreCharsDatabase and in .ignoreCharsInput is that a search expression such as "Mr. John" will return the same results as "Mr John".

Note that there is a database performance hit for stripping characters out of the search expression; .ignoreCharsDatabase should be specified with care. In Oracle and PostgreSQL, the performance hit is O1 while in IBM DB2, MS Access, MySQL, SQLAnywhere and MS SQL Server the performance hit is ON where N = the number of characters specified.

.ignoreCharsInput

Data TypeAcceptable ValuesDefault Value
StringAny string"" or "non-alphanumeric"
(see discussion below)

Only applies to reference fields of type "quickpop" or type "quickpick". The characters specified in .ignoreCharsInput will be stripped from the search expression before the search is executed. The value typed by the user into the reference field’s input element will not be affected; the characters will only be stripped out before the search is executed on the database.

If the empty string ("") is specified, then no characters will be stripped from the input string.

If the special value "non alphanumeric" is specified then any character which is not an upper- or lower-case character (A-Z or a-z) and is not a digit (0-9) or a space will be stripped from the search expression. If data in a referenced field’s database column contains non-alphanumeric data which should affect the search results (for example, "a - b" should return different results than "a b") then "non alphanumeric" should not be used.

If the specified string begins with a caret ("^") then all non-alphanumeric characters with the exception of the characters in the specified string (excluding the initial caret) will be stripped from the input string. With the previous example, to ignore all non-alphanumeric characters except for the dash, specify "^-" for .ignoreCharsInput.

If any other string is specified than all the characters in the specified string will be stripped out of the input string before the search is executed on the database.

The default value of .ignoreCharsInput depends on the number of referenced fields specified for the field (parameter #4 of .appendReference). If only one field is specified then the default is "", otherwise the default is "non-alphanumeric". The reason for the different defaults is that the displayed value of multi-field references is always calculated via data-driven format functions which are likely to introduce non-alphanumeric characters that do not exist in the database fields. For example, consider a reference field consisting of the fields "salutation", "firstName", "mi", "lastName" with values of "Mr", "John", "A", "Adams" and a data-driven formatted value of "Adams, Mr. John A.". Since the default value of .ignoreCharsInput will strip all non-alphanumeric characters from the input string, the example row will be returned by a search for either "Adams Mr J" or "Adams, Mr. J". If the reference field only has one referenced field then non-alphanumeric characters are more likely to actually appear in the database column and therefore have actual meaning to the user.

If .ignoreCharsInput is specified at the application or table level and the default value is desired at a higher level (table or field element when specified at the application level or field element when specified at the table level), specify an .ignoreCharsInput value of undefined for the higher-level element.

.inputSize

Data TypeAcceptable ValuesDefault Value
Integer5 – 5010

This property specifies the width (in number of characters to display) of the field’s edit input.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to select a value before the row can be saved.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.isSortExtended

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Only applies if .isSortable is true. If .isSortExtended is true, the user will be able to sort the data by each individual referenced field (parameter 4 of the .appendReference function). If .isSortExtended is false, the user will still be able to sort the data by the reference field, but the sort order is fixed to the order the fields are listed in parameter 4 of the .appendReference function.

.isUnique

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isUnique is true, the field value must be unique to the table, within the current foreign keys (entire table if the table does not have foreign keys); the user will not be able to save the row if another row exists with the same value.

.selectSize

Data TypeAcceptable ValuesDefault Value
Integer1 – 208

The number of rows to display in the quickpick select element. This number is also used as the fetch size (the number of matches to return) for searches.

.type

Data TypeAcceptable ValuesDefault Value
String"quickpop", "quickpick", "poptable""quickpop"
Property ValueDescription
"quickpop"The input controls include both a quickpick and a poptable. The poptable is a button which when clicked displays the linked table in a new popup window.
"quickpick"Only the quickpick input control is displayed.
"poptable"Only the poptable input control is displayed.

RowState

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.rowState{properties}
app.dbiScriptProperties.dataTables.fields.rowState{properties}
[table element].appendRowState

.iconPath

Data TypeAcceptable ValuesDefault Value
StringNon-zero length string"images/"

This property specifies the relative path (from the application directory) to the directory where the icons are located.

.icons

Data TypeAcceptable ValuesDefault Value
Array of StringsNon-zero length strings["state0.png","state1.png"]

This property specifies the icons for the field. All specified files must be located in the .iconPath directory.

.initialFilterState

Data TypeAcceptable ValuesDefault Value
Integer0+0

This property only applies to inline fields. The .initialFilterState property specifies the index of an icon in the field’s .icons property to display in the field’s filter button which is located in the column header. The acceptable values for the property range from 0 to the length of the .icons property array. A value equal to the length of the .icons property array will display the filter button’s blank state. The filter button’s blank state is equivalent to ‘no filter’. The other states filter the table’s rows to display only those rows where the field value matches the filter state.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is false, the user will be able to select a [Blank] value In addition to the icons listed in the .icons property. If .isRequired is true and the database column does support null values, the [Blank] value will be displayed for any existing field values which are null.

SectionHeader

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.sectionHeader{properties}
app.dbiScriptProperties.dataTables.fields.sectionHeader{properties}
[table element].appendSectionHeader

.displayModes

Data TypeAcceptable ValuesDefault Value
String"both", "display", "edit""both"

This property indicates in which row modes the sectionHeader will be displayed. If set to "display", the sectionHeader will only be displayed when the row is in display mode. If set to "edit", the sectionHeader will only be displayed when the row is in edit mode. When set to the default "both", the sectionHeader is displayed in both the display mode and the edit mode of the row.

Select

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.select{properties}
app.dbiScriptProperties.dataTables.fields.select{properties}
[table element].appendSelect

.allowNew

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

This property specifies whether or not users can enter new values into the select. New select values are stored in the field’s definition table. If .allowNew is true, two additional items appear at the bottom of the select list: "New Item" which enables the user to enter one new item within the field’s GUI and "New Items…" which displays a dialog where the user can enter one or more new values.

.code

Data TypeAcceptable ValuesDefault Value
StringField name""

This property specifies an optional column of the Select field’s source definition table to include in the description of each item in the select element using the format "Description (Code)". If .code is specified, the select element’s keyboard shortcuts work with the item code values as opposed to the normal select element behavior of working with the item description.

.dataOrder

Data TypeAcceptable ValuesDefault Value
String"descr asc", "descr desc",
"code asc", "code desc"
"descr asc"

The sort order of the items of the Select element: by description or code column in ascending or descending order. This property only applies to Selects based on a definition table; the items of hard-coded Selects retain their defined order.

.forceCase.description

Data TypeAcceptable ValuesDefault Value
String"", "lower", "UPPER""" (do not force case)

Only applies to the description of new select items.

.forceCase.code

Data TypeAcceptable ValuesDefault Value
String"", "lower", "UPPER""" (do not force case)

Only applies to the code of new select items.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to select a value before the row can be saved.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.isUnique

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isUnique is true, the field value must be unique to the table, within the current foreign keys (entire table if the table does not have foreign keys); the user will not be able to save the row if another row exists with the same value.

String

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.string{properties}
app.dbiScriptProperties.dataTables.fields.string{properties}
[table element].appendData
where field data type is CHAR, VARCHAR or a variant / subtype thereof

.allowForceMemo

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .allowForceCase is true and the size of the underlying database field exceeds the value of .forceMemoFieldSize, then the String field will be automatically changed to a Memo field.

.forceCase

Data TypeAcceptable ValuesDefault Value
String"", "lower", "UPPER""" (do not force case)

If .forceCase is specified and the stored value of a field does not match the .forceCase setting, the field value will be altered to reflect the .forceCase setting when its row is edited.

.forceMemoFieldSize

Data TypeAcceptable ValuesDefault Value
Integer1+100

This property specifies the minimum size, in characters, of the underlying database field at which the field type is automatically changed from String to Memo. Note that when a String field is changed to a Memo field, any set properties of the field which are not supported by the Memo field type will be ignored.

.inputMask

Data TypeAcceptable ValuesDefault Value
StringNon-zero length string(s)None
Array of Strings

An input mask is used to control the entry of data into the field and to alter the display of the field value according to the rules listed in this table. If a string is specified for .inputMask, the input mask is static. If an array is specified, the input mask is dynamic and the value returned by the field’s setInputMaskIndex data-driven function (see page 205) indicates which input mask is to be applied to the field.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to enter a non-empty string before the row can be saved. If .isRequired is false an empty field value will be stored either as null if the database column allows nulls or an empty string if it does not.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.isUnique

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isUnique is true, the field value must be unique to the table, within the current foreign keys (entire table if the table does not have foreign keys); the user will not be able to save the row if another row exists with the same value.

.soundex.autoCreate.isEnabled

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue
Inheritance Stop Pointapp.dbiScriptProperties.dataTables.fields.string

Soundex companion columns improve the performance of sounds like searches. When the database is rebuilt through dbiScript and .soundex.autoCreate.isEnabled is true, the data table is scanned for char & varchar fields for which .soundex.autoCreate.minColWidth <= column width <= .soundex.autoCreate.maxColWidth and soundex.create is undefined. For every matching field, if a column to store the SOUNDEX() value of the char/varchar field value does not exist in the table, then it will be created.

Soundex columns follow the naming convention [string field name] + [.soundex.extension] (example: fname_sx stores the SOUNDEX() value of fname). The default value of .soundex.extension is "_sx".

To manually control soundex creation for individual fields, see .soundex.create below.

.soundex.autoCreate.maxColWidth

Data TypeAcceptable ValuesDefault Value
Integer1+50
Inheritance Stop Pointapp.dbiScriptProperties.dataTables.fields.string

When the database is rebuilt and .soundex.autoCreate.isEnabled is true, any field where .soundex.create is undefined and a column width that is at least .soundex.autoCreate.minColWidth characters and no more than .soundex.autoCreate.maxColWidth characters will have a companion soundex created for it.

.soundex.autoCreate.minColWidth

Data TypeAcceptable ValuesDefault Value
Integer1+4
Inheritance Stop Pointapp.dbiScriptProperties.dataTables.fields.string

When the database is rebuilt and .soundex.autoCreate.isEnabled is true, any column with a width that is at least .soundex.autoCreate.minColWidth characters and no more than .soundex.autoCreate.maxColWidth characters will have a companion soundex created for it.

.soundex.create

Data TypeAcceptable ValuesDefault Value
Booleantrue, false, undefinedfalse

When .soundex.create is true and the database is rebuilt, a companion soundex column will be created for the string field’s column when the database is rebuilt. The soundex column will also be created if .soundex.create is undefined, .soundex.autoCreate.isEnabled is true, the underlying data type is char or varchar, and the width of the string field’s column falls within .soundex.autoCreateMinColWith and .soundex.autoCreateMaxColWith.

The soundex column is used when searching for a string that sounds similar to a string specified by the user in the search dialog. In MS Access, the soundex companion field is required in order to be able to perform sounds like searches. In all databases, the generated soundex companion field is indexed and used to improve the performance of sounds like queries.

The name of the generated soundex column will be a concatenation of the string field name and the soundex.extension setting.

In PostgreSQL, soundex columns require the fuzzystrmatch database extension. dbiScript will attempt to automatically install the extension. If you receive errors indicating that the SOUNDEX function does not exist, manually install the extension by executing the command "CREATE EXTENSION fuzzystrmatch" in the PostgreSQL Execute arbitrary SQL queries window.

.soundex.extension

Data TypeAcceptable ValuesDefault Value
StringNon-zero length string"_sx"

The name for the field’s soundex companion column is the field name + .soundex.extension.

.soundex.triggers.create

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

When set to true and rebuilding Oracle, MySQL and PostgreSQL databases, any soundex column that is created will have corresponding insert and update triggers created to populate the column.

Treeview

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.treeview{properties}
app.dbiScriptProperties.dataTables.fields.treeview{properties}
[table element].appendTreeview

.allowNew

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

This property specifies whether or not users can enter new values into the treeview. New treeview values are stored in the field’s definition table.

.deletes.allowLinkedItems

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

When .deletes.allowLinkedItems is false, a treeview item cannot be deleted if it is a parent of another treeview item or if it has been selected as the field value for any row.

.deletes.allowWithoutConfirm

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

When .deletes.allowWithoutConfirm is true, the delete treeview item dialog box includes a Don’t ask again checkbox. This property is ignored if .deletes.confirm is false.

.deletes.confirm

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

When .deletes.confirm is true, the user is prompted to confirm every treeview item delete.

.displayPath

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .displayPath is true, the entire path of the selected treeview item is displayed whereas if .displayPath is false, only the description of the selected treeview item is displayed.

.forceCase

Data TypeAcceptable ValuesDefault Value
String"", "lower", "UPPER""" (do not force case)

Only applies when adding new items to a treeview.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to select a value before the row can be saved.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.isUnique

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isUnique is true, the field value must be unique to the table, within the current foreign keys (entire table if the table does not have foreign keys); the user will not be able to save the row if another row exists with the same value.

.pathSeparator

Data TypeAcceptable ValuesDefault Value
StringNon-zero length string" \\ "

If [treeview field element].displayPath is true, this character is used to delimit the path of a treeview item. The default value is specified as " \\ " as opposed to " \ " because JavaScript’s escape character is "\".

.windowHeight

Data TypeAcceptable ValuesDefault Value
Integer100 – 1000450

This property specifies the height of the treeview window.

.windowWidth

Data TypeAcceptable ValuesDefault Value
Integer100 – 1000300

This property specifies the width of the treeview window.

URL

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.url{properties}
app.dbiScriptProperties.dataTables.fields.url{properties}
[table element].appendURL

.forceValid

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Whenever a URL field’s row is saved, the entered URL is tested against a URL testing regular expression. If the field’s value is non-empty and it fails the test, the user will be presented with either a validation error or a verification message depending on whether .forceValid is true or false, respectively. The validation error is "Invalid URL" and the verification message is "Does not appear to be a valid URL". If .forceValid is true, the row cannot be saved if the field value fails the URL test.

URLs are complex and while the URL test is quite robust it should not be considered definitive. If .forceValid is true and validation is preventing your users from entering URLs that are known to be valid, you should set .forceValid to false. When .forceValid is false, the users will still be warned if the URL appears to be invalid. Forced validation can also be handled in the field’s data-driven validate function.

.isReadOnly

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Generally, the .isReadOnly property should only be set true if the field’s value is set by a stored procedure of the database. When .isReadOnly is true, the field cannot be edited and all of its edit-mode properties are ignored.

.isRequired

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If the field’s database column does not allow nulls then .isRequired is true, otherwise .isRequired is inherited. If .isRequired is true, the user will be forced to enter a non-empty string before the row can be saved. If .isRequired is false an empty field value will be stored either as null if the database column allows nulls or an empty string if it does not. Note that setting .isRequired to true will only force your users to enter a non-empty string; if you wish to force the entry of a valid URL then you must also set .forceValid to true.

.isSortable

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If .isSortable is true and the field is inline, the user can sort the data by clicking on the field’s header cell. For both inline and drilldown fields, sortable columns are listed in the table’s sort window.

  • Create an index on every sortable field in your database

.isUnique

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

If .isUnique is true, the field value must be unique to the table, within the current foreign keys (entire table if the table does not have foreign keys); the user will not be able to save the row if another row exists with the same value.

WebServiceRequest

Inherits FromInstantiated By
[table element].dbiScriptProperties.fields.webServiceRequest{properties}
app.dbiScriptProperties.dataTables.fields.webServiceRequest{properties}
[table element].appendWebServiceRequest

.allowManualRefresh

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

If the .allowManualRefresh property is true, then the display and edit controls will include a "Refresh" button which, when clicked, initiates an attempt to retrieve data from the web service utilizing. When the field is refreshed while the row is in edit mode, the current values of the row are sent to the field’s data-driven functions.

.attemptsToMake

Data TypeAcceptable ValuesDefault Value
Integer1 – 102

The .attemptsToMake property specifies the maximum number of attempts to retrieve data from the web service. Server errors will not be reported unless the error occurs during the final attempt.

.httpMethod

Data TypeAcceptable ValuesDefault Value
String"GET", "POST""POST"

The .httpMethod property specifies the HTTP method to use when communicating with the web service. The "GET" method sends the name/value pair query strings in the URL of the GET request. The "POST" method sends the name/value pair query strings in the HTTP message body of the POST request.

.jsonp

Data TypeAcceptable ValuesDefault Value
StringAny string"jsonp"

This property only applies to WebServiceRequest fields of type "jsonp". It specifies the name of the callback or "padding" function passed to the web service. This function will not be used by dbiScript and is stripped off in order to return only the json value.

.millisecondsBetweenAttempts

Data TypeAcceptable ValuesDefault Value
Integer0 – 10000500

This property specifies the number milliseconds to wait between attempting to retrieve data from the web service.

.refreshButtonCaption

Data TypeAcceptable ValuesDefault Value
StringNon-zero length string"Refresh"

This property specifies text to use in place of the default refresh button image [ Default Refresh Button ].

.refreshOnLoad

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsetrue

When .refreshOnLoad is true, the field is refreshed when the field’s row is loaded by sending a request to the web service. If .refreshOnLoad is false, then .allowManualRefresh should be set to true (otherwise the field is essentially non-functional).

.sendEmptyValues

Data TypeAcceptable ValuesDefault Value
Booleantrue, falsefalse

Set .sendEmptyValues to true if you want empty values returned in the object of the field’s data-driven calculateHttpData function to be included in the query string / post to the server. By default, empty values are stripped before the data is sent. Empty values include undefined, null and NaN values, empty strings ("") and strings which consist of only spaces (i.e. " "). If .sendEmptyValues is true, empty values are sent as an empty string ("").

.serverErrorDisplay

Data TypeAcceptable ValuesDefault Value
String"screen", "console", "suppress""screen"

This property specifies where sever errors should be displayed. The "screen" setting indicates that errors should be displayed in a messagebox in the browser. The "console" setting indicates that errors should be logged to the console. The "suppress" setting indicates that no messages should be displayed.

.textAlign

Data TypeAcceptable ValuesDefault Value
String"left", "center", "right""center"

This property specifies the text alignment of the field’s text in display mode.

.type

Data TypeAcceptable ValuesDefault Value
String"csv", "json", "jsonp", "string", "xmlString", "xml", "xmlEmbedded""string"

The .type property specifies the format of the data returned by the web service. Tthe following table explains each setting:

SettingDescription
"csv"

The web service returns data in comma-separated value format. Data is passed to the field’s data-driven processResponse function as an array of arrays in the format:

[ [ A1 , B1 , C1 , … ] , [ A2 , B2 , C2 , … ] , [ A3 , B3 , C3 , … ] , … ]

Where A1 refers to the value in the first column ("A") and first row ("1") of the file, etc.
If the web service will return a single value, specify the "string" type instead.

"json"The web service returns data as a JSON (JavaScript Object Notation) object. The object is passed directly to the field’s data-driven processResponse function.
"jsonp"The web service returns a function call containing the data in JSON format. The function call will not be used by dbiScript and will be stripped off. The JSON data is passed directly to the field’s data-driven processResponse function.
"string"The web service returns a single string value which is passed directly to the field’s data-driven processResponse function.
"tsv"The web service returns data in tab-separated value format. The data is processed in the same manner as for the "csv" WebServiceRequest type.
If the web service will return a single value, specify the "string" type instead.
"xml"The web service returns an XML document containing the return data. The data is converted into a JSON object and passed to the field’s data-driven processResponse function.
"xmlEmbedded"The web service returns the data as an XML document embedded within another XML document. The data is converted into a JSON object and passed to the field’s data-driven processResponse function. This is the format utilized by webservicex.net and others.
"xmlString"The web service returns a single string value contained in an XML wrapper. The string is parsed from the XML container and passed to the field’s data-driven processResponse function.

To inspect the data returned by the web service, use console.log as per the following example:

function client_stockPrice_processResponse(o){ console.log(o); }

Functions

Acronyms for Complex Data Types

The following acronyms define complex data types used in dbiScript functions:

AcronymPhraseData TypeDescription
FDAField Definition ArrayArray

["field name","data type",{options}]
or
[["field name","old field name"],"data type",{options}]

The field definition array is used to specify a data type for the column when (re)building the database.
To rename a field in the database, use the second form of the field definition array and rebuild the database.
Options: See Field Definition Array Optional Properties below
Practical example: ["field1","varchar(10)",{indexed:true}]

FNFDAField NameStringThe name of the field in the database.
Field Definition ArrayArraySee FDA above.
Field Definition Array Optional Properties
PropertyData TypeDefault ValueDescription / Notes
allowNullBooleantrueThe .allowNull setting specifies whether or not the field accepts NULL values.
dropBooleanfalseIf .drop is true, the field will be dropped from the table on the next database rebuild.
indexedBooleanfalseIf .indexed is true and the index doesn’t already exist, an index will be built for the column on the next database rebuild. If .indexed is false and an index exists for the column, the index will be removed on the next database rebuild.
updateBooleanundefinedIf .update is true, an ALTER will be forced on the field on the next database rebuild. This is not normally necessary when changing a field’s data type since dbiScript will detect most data type changes. If .update is false, the field will not be updated (forced no update).

Parameter Numbering

For reference, parameters are numbered starting with 1. In some cases, a single function criterion may span several parameters. The parameter number of these criteria is followed by the plus sign (+) which indicates the first element of the criterion is specified by the indicated parameter number and any additional elements of the criterion are specified in the subsequent parameters. For example, when adding a definition table with three identity fields, the identity fields would be specified by parameters number 3, 4 and 5.

Optional Properties

Several dbiScript functions accept a parameter for optional properties. The parameter number of the optional properties is always LAST which indicates that it may be specified in place of any of the optional parameters which are not used. For example, when adding a definition table that does not have any identity fields but does have a unique primary key, the optional properties object may be specified in parameter 3.

app.addDefinitionTable("dfn1","descr",{primaryKey:"dfnid"});

Application Functions

app.addDefinitionTable

ParameterRequired?Data TypeDescription / Notes
#Name
1Table NameYesStringThe name of the table in the database.
2Description Field NameYesFNFDAThe name of the field which stores the definition description.
3+Identity Field Name(s)NoFNFDAThe name of the field(s) which store the definition identity information.
When the database is (re)built through dbiScript, identity columns are always indexed.
LASTOptional PropertiesNoObjectInherited Properties
See Definition Table Properties.
Non-inherited Properties
See Non-Inherited Definition Table Properties below.

Non-Inherited Definition Table Properties

PropertyData TypeDescription / Notes
additionalFieldsListArray of FDAsA list of columns to include when (re)building the database.
dataOrderStringA comma-delimited list of field names specifying the initial display order of the data.

app.addFileTable

ParameterRequired?Data TypeDescription / Notes
#Name
1Table NameYesStringThe name of the table in the database.
2Source Primary ID Field NameYesStringThe name of the field which stores the primary id of the file’s parent row.
3Filename Field NameYesFNFDAThe name of the field which stores the name of the file.
4Userid Field NameYesFNFDAThe name of the field which stores the id of the user that has checked in/out the file.
5Action Field NameYesFNFDAThe name of the field which stores the description of the action that was performed on the file.
6Occurred Field NameYesFNFDAThe name of the field which stores the datetime when the action was performed on the file.
7+Identity Field Name(s)NoFNFDAThe name of the field(s) which store the file identity information.
LASTOptional PropertiesNoObjectInherited Properties
See File Table Properties.

app.addLinkTable

ParameterRequired?Data TypeDescription / Notes
#Name
1Table NameYesStringThe name of the table in the database.
2Parent Primary ID Field NameYesStringThe name of the field which stores the primary id of the link’s parent row.
3Child Primary ID Field NameYesStringThe name of the field which stores the primary id of the link’s child row.
4Order Field NameYesFNFDAThe name of the field which stores the order of the link row within its group. Note that this field is not used for all types of links within dbiScript, however it is a required field. An FDA may be specified. If an FDA is not specified and the database is rebuilt through dbiScript, a BYTE field will be used.
5+Identity Field Name(s)NoFNFDAThe name of the field(s) which store the link identity information.
When the database is (re)built through dbiScript, identity columns are always indexed.
LASTOptional PropertiesNoObjectInherited Properties
See Link Table Properties.

app.addPhotoTable

ParameterRequired?Data TypeDescription / Notes
#Name
1Table NameYesStringThe name of the table in the database.
2Source Primary ID Field NameYesStringThe name of the field which stores the primary id of the photo’s parent row.
3Filename Field NameYesFNFDAThe name of the field which stores the filename of the photo.
4Description Field NameYesFNFDAThe name of the field which stores the photo description.
5Order Field NameYesFNFDAThe name of the field which stores the order of the photo within its album.
6+Identity Field Name(s)NoFNFDAThe name of the field(s) which store the photo identity information.
LASTOptional PropertiesNoObjectInherited Properties
See Photo Table Properties.

app.gui.addSystemTable

ParameterRequired?Data TypeDescription / Notes
#Name
1Table NameYesStringThe name of the table in the database.
2Table CaptionNoStringThe caption to use for the table in its pageframe tab, e.g. "System".

The fields of the system table are mapped to values of the System variable. These values can be used in calculations within any data-driven function. Only one system table can be added to the application and it has only one row with only a drilldown area – there is no inline section of the system table. The system table always appears as the last tab of the first pageframe and is only available to system administrators.

Note that the system table, like all tables in dbiScript, requires an auto-generated primary key.

app.gui.appendDataTable

ParameterRequired?Data TypeDescription / Notes
#Name
1Table NameYesStringThe name of the table in the database.
2Plural Form of Table CaptionYesStringThe caption to use for the table in its pageframe tab, e.g., "Companies". A non-zero length string is required.
3Singular Form of Table CaptionNoStringThe caption used for table types S1, S2, M1, M2 and also some dialog boxes, e.g., "Company". A non-zero length string is required. If this parameter is omitted, the plural form of the table caption (parameter 2) will be used in its place.
4RelationshipsNoStringA string specifying the table’s parent tables and foreign keys in the format "parent_table_name_1:foreign_key_1, parent_table_name_2:foreign_key_2, … "
Example: "insmst:insmstid,patient:patientid"
5Minimum # of RowsNoIntegerThe minimum number of rows (per unique combination of foreign keys) required before the parent row can be saved.
This setting is ignored if the data table does not have any foreign relationships (parameter 4).
No minimum # of rows is specified by a value of undefined or 0.
6Maximum # of RowsNoIntegerThe maximum number of rows (per unique combination of foreign keys) allowed.
This setting is ignored if the data table does not have any foreign relationships (parameter 4).
An unlimited maximum # of rows is specified by a value of undefined or 0.
LASTOptional PropertiesNoObjectInherited Properties
See Data Table Properties.
Non-Inherited Properties
See Non-Inherited Data Table Properties below.

Non-Inherited Data Table Properties

PropertyData TypeDescription / Notes
dataOrderStringA comma-delimited list of field names specifying the initial display order of the data.
dropBooleanIf this property is true, the table will be dropped from the database on the next database rebuild.
filterStringA string specifying the initial filter to apply when selecting the data.
app.gui.appendDataTable("table1","Table 1",{dataOrder:"lname,fname,mi"});
var o = app.gui.appendDataTable("table1","Table 1");
o.dbiScriptProperties.dataOrder = "lname,fname,mi";

Datatable Keyboard Shortcuts

The shortcuts are applied to the table which has focus.

Display Mode Active Keys

The following keyboard shortcuts apply when no rows in the active table are being edited:

Key CombinationEffect
EnterEdit selected row.
EscUnselect current row and set focus to the active table of the parent page frame.
SpacebarRefresh the current page.
Up ArrowGo to the previous row.
Down ArrowGo to the next row.
Page UpGo to the previous page.
Shift + Up Arrow
Shift + Page Up
Set focus to the active table of the parent page frame. Ctrl or Alt can be used in place of Shift.
Shift + Down Arrow
Shift + Page Down
Set focus to the active table of the child page frame. Set focus to the first row of the table if no row is selected. Ctrl or Alt can be used instead of Shift.
DeleteDelete the selected row.
Ctrl + n
Ctrl + m
Add a new row. Ctrl + m is provided as an alternative for Google Chrome which does not permit capture of Ctrl + n in JavaScript.
Edit Mode Active Keys

The following keyboard shortcuts apply when at least one row in the active table is being edited:

Key CombinationEffect
EscCancel changes.
DeleteDelete the selected row (if the selected row is in display mode).
Ctrl + sSave changes.

Data Table Functions

These table functions are available to all data tables. With the exception of .appendPhotoAlbum, each function appends a field to either the inline or drilldown section of the table. The fields in the inline section of the table are always displayed while the drilldown section is only displayed for selected rows and rows that are being edited.

S1, S2 and M1 tables do not have an inline section to their GUI, their fields are always appended to the drilldown table section regardless of whether the inline or drilldown section is specified. Foreign rows also do not have an inline section to their GUI. When a table is displayed as a foreign row, its inline fields appear first in the drilldown section followed by the defined drilldown fields.

Physical vs. Virtual Fields

Fields that physically exist in the database table are referred to as physical fields while those that exist only within the GUI are called virtual fields. Care should be taken when choosing the name of a virtual field. Assigning to a virtual field the name of field that exists in the database table won’t necessarily cause an error, however field names in each GUI table must be unique; using a physical field name for a virtual field would prevent you from adding the physical field to the GUI. The .appendAge and .appendMemoPreview functions are unique in that while they do create virtual fields in the GUI, the field name parameter must be a the name of a field which physically exists in the database. The name of the virtual fields created by these functions are [field name]_dbiAge and [field name]_dbiPreview, respectively.

HTML Classes

dbiScript adds multiple HTML class names to many of the elements it creates. These class names are not used by dbiScript. They are provided to aid you in any custom styling you may wish to apply to your dbiScript application. The prefix "dbi" is used for every class name to help keep the dbiScript classes from interfering with your custom classes.

<style>
.dbiCaption { color: red } // all captions will be white
.dbiCaption.dbiDrilldown { color: white } // all drilldown captions will be red
</style>

dbiScript Class Names

Each "piece" of every field object which dbiScript creates is assigned either six or seven HTML class names. The first class name identifies which type of object it is:

Class NameHTML TagNotes
dbiAnchora (anchor)
dbiButtonbutton
dbiCaptiondivA field caption.
dbiImagedivThe image is set as the background url of the div.
dbiInputinputAn input of type="text".
dbiRadioinputAn input of type="radio"
dbiSelectselect
dbiTextdiv
dbiTextareatextarea

The second class name, if specified, identifies the object’s subtype. The subtype is only included if there are two or more objects of the same primary type within the object. For example, the reference field’s edit object has two buttons in it. The subtype of the first button is "dbiButtonForeignRowToggle". The subtype of the second button is "dbiButtonWindowOpener".

The third class name identifies which dbiScript field type it is. These class names are specified below in the descriptions of each field’s instantiation method. The values range from "dbiAgeField" to "dbiWebServiceRequestField".

The fourth class name identifies the section of the row in which the object is located. The value is either "dbiInline" or "dbiDrilldown".

The fifth class name specifies whether the object is in the field’s display object or its edit object. The value is either "dbiDisplay" or "dbiEdit".

The sixth class name specifies the table which the object belongs to. The title case of the table name (without spaces) is used. For example, the class name of an object belonging to table patientHistory is "dbiTablePatientHistory".

The seventh class name specifies the field which the object belongs to. The title case of the field name (without spaces) is used. For example, the class name of an object belonging to field firstName is "dbiFieldFirstName". Note that a multi-class union may be used to uniquely identify a field within a table, i.e:

<style>
.dbiTablePatientHistory.dbiFieldFirstName {color: blue}
</style>

Search Window

Elements created for the search window have class name "dbiSearch" in place of the fourth and fifth class names (i.e. dbi[ Inline | Drilldown ] and dbi[ Display | Edit ]).

Field Captions

Each of the .append[Field Type] table functions requires a field caption to be specified as the second parameter. A string value or an array of two string values is required. If the specified value (or first parameter of an array) is non-string then the field name will be used as the caption. If the field name is desired as the field caption then undefined should be specified as the field caption. If there is no suitable caption for the field, then an empty string ("") should be specified. The normal format of the field GUI is to display the field caption and then the field value or edit elements in the format Field Caption: [Field Value / Edit Elements]. If the field value and edit elements should be displayed within the field caption, then specify the location of the field value / edit elements with "[---]" as in "Field Caption Before [---] Field Caption After". A field caption which contains the field value is typically used to qualify the following field; the format of this display is Field Caption Before [Field Value / Edit Elements] Field Caption After: (note the placement of the colon). The option of displaying the field value and elements within the field caption does not apply to Memo Fields or Picklist Fields.

An array of two strings should be specified for any field that is part of an inline or drilldown group. The first parameter of the array is used within the GUI of the display and edit rows while the second parameter is used everywhere else when referring to the field. For example, consider the field "hphone" which is part of a group named "Phone Numbers". The proper field caption array for this field would be ["Home","Home Phone Number"].

HTML Class Attribute

Each field caption is an HTML div element. The HTML class attribute of the div is a set of five class names:

"dbiCaption dbi[ Inline | Drilldown ] dbi[ Display | Edit ] dbi_[ table name ] dbi_[ table name ]_[ field name ]"

Field name: patient.lname, Location: inline section

"dbiCaption dbiInline dbiDisplay dbi_patient dbi_patient_fname"

Field Placement (Inline vs. Drilldown)

Fields are appended to either the inline section or the drilldown section of the table, as illustrated in the following practical example:

var o = app.gui.appendDataTable("table1","Table 1");
o.appendData("field1","Field 1"); // Field appended to the inline section of the table.
o.drilldown.appendData("field2","Field 2"); // Field appended to the drilldown section of the table.

Most of the field types can be placed in either the table’s inline section or the drilldown section. The exceptions to the rule are:

Field TypeRestrictions
MemoDrilldown-Only
MemoPreviewInline-Only
The inline MemoPreview field is designed to be used in conjunction with a drilldown Memo field. The MemoPreview provides a read-only inline preview of the first few words of the memo field. The field is edited in the associated Memo field.
PhotoAlbumThe photo album appears in a special section of the data table. Attempting to append a photo album to the drilldown section of the table will result in an error.
PicklistThe Picklist is designed for the drilldown section. It’s not recommended for the inline section.
SectionHeaderDrilldown-Only
The SectionHeader provides a horizontal break in the drilldown section of the table.

Grouping Fields

.groupFields

ParameterRequired?Data TypeDescription / Notes
#Name
1Group NameYesStringThe group name.
2Group CaptionYesStringThe caption to display for the group.
3+Field Name(s)YesStringThe name of an existing inline field to include in the group.

The groupFields function combines the display view of two or more fields. The displayed value is determined by the group’s data-driven format function. The grouped fields are edited separately.

var o = app.gui.appendDataTable("patient","Patients");
o.appendData("fname","First Name");
o.appendData("mi","MI");
o.appendData("lname","Last Name");
o.groupFields("name","Name","fname","mi","lname");
Comparison of Grouped vs. Ungrouped Inline Fields
Example of Grouped Inline FieldsExample of Ungrouped Inline Fields

Messagebox

In Chapter 12 we’ll be discussing data-driven functions. With some of the data-driven functions, you may want to communicate with your users. The dbiScript messagebox function provides a user-friendly means to do so. The messagebox is the dbiScript alternative to the HTML alert and confirm boxes.

ParameterRequired?Data TypeDescription / Notes
#Name
1FunctionNoFunctionThe function to call after the messagebox is closed. The function is passed a single parameter; an integer which indicates which button was pressed. If the user closed the messagebox by pressing the keyboard "Esc" button or by clicking the window’s close button [ Window Close Button ] then the value of the initially selected (rightmost) button is returned.
Button Values
1: "OK", 2: "Cancel", 3: "Abort", 4: "Retry", 5: "Ignore", 6: "Yes", 7: "No", 8: "Accept", 9: "Decline"
2MessageYesStringThe message to display. If an array is specified, it must be a two-element array of strings. The first element is displayed as the message and the second element is a long message which is displayed in a scrollable textarea of the messagebox. HTML can be used in both strings. The long message can be an HTML document.
Array of Strings
3OptionsNoIntegerThis parameter specifies one or more options for the messagebox from the categories listed below. To specify multiple options, add the desired options together (i.e. 20 would result in a messagebox with "Yes" & "No" buttons and the Messagebox Error Icon icon).
Buttons
1: "OK" & "Cancel"
2: "Abort", "Retry" & "Ignore"
3: "Yes", "No" & "Cancel"
4: "Yes" & "No"
5: "Retry" & "Cancel"
6: "Accept" & "Decline"
Icons
16: Messagebox Error Icon 32: Messagebox Question Icon 48: Messagebox Exclamation Icon 64: Messagebox Information Icon
4Window TitleNoStringThe text to display in the window’s title bar. If not specified, the title of your dbiScript application is used.
Examples
Messagebox Example
messagebox("A simple messagebox.");
Messagebox Example
messagebox("Don't do that.",16);
Messagebox Example
messagebox("Are you sure you want to do that?",36,"Confirm");
Messagebox Example
messagebox(["This is what happened when you did that:","<ul><li>This bad thing</li><li>And this other bad thing</li><li>Plus this <b>really</b> bad thing</li></ul>"],64,"I Told You Not To Do That");
Messagebox Example
messagebox(function(i){messagebox("You pressed "+{2:"Cancel",6:"Yes",7:"No"}[i]+".",64,"The Wizard Knows");},"I'll know which button you press.",51,"The Wizard");
Messagebox Example

Field Functions (A - M)

.appendAge

Age Fields Are Read-Only
ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesStringThe name of the date, datetime or timestamp field in the database table for which to calculate the age.
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
LASTOptional PropertiesNoObjectInherited Properties
See Inline Field Properties.
See Drilldown Field Properties.

The Age field displays the current age in years of a date, datetime or timestamp value.

HTML Class Attribute

The text of the age field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiAgeField dbi[ Inline | Drilldown ] dbi[ Display | Edit ] dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiAgeField dbiInline dbiDisplay dbiTablePatient dbiFieldAge"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendAggregate

Aggregate Fields Are Read-Only
ParameterRequired?Data TypeDescription / Notes
#Name
1Virtual Field NameYesStringThe name of the virtual field.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Child TableYesStringThe name of the child table on which to perform the calculation.
4CalculationYesStringThe calculation to perform.
Example: "SUM(order.totalCharge)"
The calculation must include one of:
"AVG", "COUNT", "MAX", "MIN" or "SUM"
The aggregate function name is not case-sensitive.
5FilterNoStringThe WHERE clause to use with the aggregate SQL statement. Do not include "WHERE" in the string. Parameters may be used in the string. Examples with parameters are provided in the Formats of the SQL Parameters section below. When parameters are used, the run-time values are specified in the field’s data-driven parameters function.
LASTOptional PropertiesNoObjectInherited Properties
See Aggregate Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The Aggregate field displays the result of the specified aggregate calculation.

Each column specified in the aggregate calculation (parameter 4) should include its table specifier (i.e. "SUM(order.totalCharge)" instead of "SUM(totalCharge)". Inclusion of the table specifier is not enforced by dbiScript. The aggregate query involves joining at least two tables; table specifiers are always recommended in SQL queries involving two or more tables.

To prevent SQL injection vulnerabilities, the aggregate calculation (parameter 4) and optional filter (parameter 5) are stored in a dbiScript system table (dbiAggregateClause). The dbiAggregateClause table is updated whenever the dbiScript application is loaded while in development mode. When the dbiScript application is launched in non-development mode, the aggregate calculation and filter are retrieved from the dbiAggregateClause table.

The optional filter (parameter 4) specifies the WHERE clause of the aggregate SQL statement. The filter can be either static or dynamic. A dynamic filter is specified by the use of SQL parameters (variables). The value of these SQL parameters is determined at run-time through the field’s data-driven parameters function.

Formats of the SQL Parameters

FormatExample
@parameterName::columnName
@parameterName::tableName.columnName

"order.orderDttm >= @startOfCurrentYear::order.orderDttm"

This is the recommended format. If the table specifier is omitted, then the specified column must be in the child table specified in parameter 3 of the aggregate field definition. This format binds the data type of the parameter to the data type of the specified column.
@parameterName[dbType]"order.orderDttm >= @startOfCurrentYear[DateTime]"
@parameterName[dbType,size]"customer.lastName = @lastName[String,50]"

If a parameter is used more than once in the filter, the subsequent instances may be specified without a qualifier (i.e. @parameterName), example:

"order.orderDttm = @startOfCurrentYear::order.orderDttm OR order.orderDttm > @startOfCurrentYear"

The following table lists the possible values for dbType. The values are case-sensitive.

ValueDescription
AnsiStringA variable-length stream of non-Unicode characters ranging between 1 and 8,000 characters.
BinaryA variable-length stream of binary data ranging between 1 and 8,000 bytes.
ByteAn 8-bit unsigned integer ranging in value from 0 to 255.
BooleanA simple type representing Boolean values of true or false.
CurrencyA currency value ranging from -2 63 (or -922,337,203,685,477.5808) to 2 63 -1 (or +922,337,203,685,477.5807) with an accuracy to a ten-thousandth of a currency unit.
DateA type representing a date value.
DateTimeA type representing a date and time value.
DecimalA simple type representing values ranging from 1.0 x 10 -28 to approximately 7.9 x 10 28 with 28-29 significant digits.
DoubleA floating point type representing values ranging from approximately 5.0 x 10 -324 to 1.7 x 10 308 with a precision of 15-16 digits.
GuidA globally unique identifier (or GUID).
Int16An integral type representing signed 16-bit integers with values between -32768 and 32767.
Int32An integral type representing signed 32-bit integers with values between -2147483648 and 2147483647.
Int64An integral type representing signed 64-bit integers with values between -9223372036854775808 and 9223372036854775807.
ObjectA general type representing any reference or value type not explicitly represented by another DbType value.
SByteAn integral type representing signed 8-bit integers with values between -128 and 127.
SingleA floating point type representing values ranging from approximately 1.5 x 10 -45 to 3.4 x 10 38 with a precision of 7 digits.
StringA type representing Unicode character strings.
TimeA type representing a SQL Server DateTime value. If you want to use a SQL Server time value, use Time.
UInt16An integral type representing unsigned 16-bit integers with values between 0 and 65535.
UInt32An integral type representing unsigned 32-bit integers with values between 0 and 4294967295.
UInt64An integral type representing unsigned 64-bit integers with values between 0 and 18446744073709551615.
VarNumericA variable-length numeric value.
AnsiStringFixedLengthA fixed-length stream of non-Unicode characters.
StringFixedLengthA fixed-length string of Unicode characters.
XmlA parsed representation of an XML document or fragment.
DateTime2Date and time data. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds.
DateTimeOffsetDate and time data with time zone awareness. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Time zone value range is -14:00 through +14:00.

HTML Class Attribute

The text of the aggregate field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiAggregateField dbi[ Inline | Drilldown ] dbi[ Display | Edit ] dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiAggregateField dbiInline dbiDisplay dbiTableOrder dbiFieldTotal"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendAggregateMoney

Aggregatemoney Fields Are Read-Only
ParameterRequired?Data TypeDescription / Notes
#Name
1Virtual Field NameYesStringThe name of the virtual field.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Child TableYesStringThe name of the child table on which to perform the calculation.
4CalculationYesStringThe calculation to perform.
Example: "SUM(order.totalCharge)"
The calculation must include one of:
"AVG", "COUNT", "MAX", "MIN" or "SUM"
The aggregate function name is not case-sensitive.
5FilterNoStringThe WHERE clause to use with the aggregate SQL statement. Do not include "WHERE" in the string. Parameters may be used in the string. Examples with parameters are provided in the Formats of the SQL Parameters section above. When parameters are used, the run-time values are specified in the field’s data-driven parameters function.
LASTOptional PropertiesNoObjectInherited Properties
See AggregateMoney Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The AggregateMoney field performs the same task as the Aggregate field but displays the result in money (currency) format. See the .appendAggregate function for more details.

HTML Class Attribute

The text of the aggregateMoney field is an HTML div element. The HTML class attribute of the button is a set of six classes:

"dbiText dbiAggregateMoneyField dbi[ Inline | Drilldown ] dbi[ Display | Edit ] dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiAggregateMoneyField dbiInline dbiDisplay dbiTableOrder dbiFieldTotal"

Please see HTML Classes for more information on uses of the HTML class Attribute.

.appendAjaxButton

ParameterRequired?Data TypeDescription / Notes
#Name
1Virtual Field NameYesStringThe name of the virtual field.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3URLYesStringThe URL to which the request is sent (i.e. "http://www.mydomain.com/mywebhandler.ashx"). If the URL does not begin with "http", it will be resolved to the local server.
LASTOptional PropertiesNoObjectInherited Properties
See AjaxButton Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The AjaxButton field adds a button to both the display and edit rows. When clicked, the field’s data-driven calculateHttpData data-driven function is called. An XMLHttpRequest object is used to send the calculated data to the URL specified in the parameters. The response from the request is processed by the data-driven processResponse function.

The AjaxButton field provides a convenient tool for handling Ajax requests. It supports the most commonly utilized features of the XMLHttpRequest object. If your require functionality which this tool does not support, use the Button field instead. A manual XMLHttpRequest (via pure JavaScript, jQuery or any other JavaScript library) can be performed in the Button field’s onclick data-driven function.

HTML Class Attribute

The button of the ajaxButton field is an HTML button element. The HTML class attribute of the div is a set of six classes:

"dbiButton dbiAjaxButtonField dbi[ Inline | Drilldown ] dbi[ Display | Edit ] dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiAjaxButtonField dbiInline dbiDisplay dbiTableOrder dbiFieldPrint"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendBoolean

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
Virtual Field NameStringThe name of the virtual field. A calculate data-driven function must be specified for a virtual field.
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
LASTOptional PropertiesNoObjectInherited Properties
See Boolean Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The data type of the database column to which the dbiScript boolean field is attached can be boolean (default), integer or string. The boolean data type is supported by SQL Server (bit), MS Access (Yes/No), MySQL (boolean, tinyint(1)), PostgreSQL (boolean) and SQL Anywhere (bit). For integer and string database fields, the stored value can be specified with the .values property. Note that MS Access does not support nulls on boolean fields so you will need to specify an integer or string database field if you are using MS Access and need a three value Boolean field in the dbiScript interface.

The following details the values and corresponding GUI representations of the Boolean field. The null value is only available if the database field supports null values and .isRequired is false. In edit mode, the available field values are cycled through by clicking the button.

Field ValueDisplay GUIEdit GUI
NULL[Blank]Boolean Edit Null
FalseBoolean Display FalseBoolean Edit False
TrueBoolean Display TrueBoolean Edit True

HTML Class Attribute

In display mode, the image of the boolean field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiImage dbiBooleanField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiImage dbiBooleanField dbiDrilldown dbiDisplay dbiTablePatient dbiFieldBillptonly"

In edit mode, the button of the boolean field is an HTML button element. The HTML class attribute of the button is a set of six classes:

"dbiButton dbiBooleanField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiBooleanField dbiDrilldown dbiEdit dbiTablePatient dbiFieldBillptonly"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendButton

ParameterRequired?Data TypeDescription / Notes
#Name
1Virtual Field NameYesStringThe name of the virtual field.
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
LASTOptional PropertiesNoObjectInherited Properties
See Button Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The Button field adds a button to both the display and edit rows. When clicked, the field’s data-driven onclick function is called.

HTML Class Attribute

The button of the Button field is an HTML button element. The HTML class attribute of the button is a set of six classes:

"dbiButton dbiButtonField dbi[ Inline | Drilldown ] dbi[ Display | Edit ] dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiButtonField dbiInline dbiDisplay dbiTablePatient dbiFieldMapAddress"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendCopyButton

ParameterRequired?Data TypeDescription / Notes
#Name
1Virtual Field NameYesStringThe name of the virtual field.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Destination TableYesStringThe name of the table to copy the data to.
4Field Mappings
and
Child Table Specs
NoArrayField Mappings
Object in the form:
{"field source":"field destination", … }
Child Table Specs
Array in the form:
["child table source", "child table destination", {"child field source":"child field destination", … }] where "child table source" and "child table destination" are required while the field mapping is optional.
LASTOptional PropertiesNoObjectInherited Properties
See CopyButton Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

A row cannot be copied while it is in edit mode; the copy button appears only when the row is in display mode.

The selected row will be copied to a new row in the destination table. The destination table does not need to be included in the dbiScript application definition.

If the destination table contains audit columns (create_dttm, create_userid, update_dttm & update_userid), these fields will not be copied from the source table; they will be populated with the id of the user who made the copy and the datetime of the copy.

The primary key column of the destination table must have the same name as that of the original table ("pid" by default) and it must be an auto-generated integer. This column does not store the primary key of the original row; it is a unique id for the copy. When child tables are included in the copy, this new id is used in place of the child’s foreign id to the parent copied row and the primary ids of any child rows will also be auto-generated integers unique to their copy (this procedure is continued through all descendant tables).

If you wish to preserve the original primary id in the row copy, there are two options:

  • Include an integer column named "original_pid" in the columns of the destination table; dbiScript will automatically fill the field with the original primary id unless a field named "original_pid" also exists in the source table in which case the source field value takes precedence.
  • Map the primary key to the desired field name in parameter 4, e.g., {pid:"old_pid"}.

All foreign id columns in each child source table must have the same name in its destination table with the exception of foreign ids that relate to tables not included in the copy; any foreign id in any table of the copy that relates to a table not included in the copy will retain its original value.

If you wish to preserve the original foreign ids of descendant tables, there are two options:

  • Include in the columns of the destination table an integer column named "original_" + the column name in the source table, e.g., "original_employeeid"; dbiScript will automatically fill the field with the original foreign id unless a field with that name also exists in the source table in which case the source field value takes precedence.
  • Map the foreign id to the desired field name in parameter 4, e.g., {employeeid: "old_employeeid"}.

The field mapping rules are as follows:

  • dbiScript will attempt to copy all fields from the source table to the destination table.
  • The fields of the destination table must have the same names as those of the source table unless the fields are mapped.
  • If a specified field cannot be found in the destination table, the field will be ignored unless it has been mapped in which case an error will be thrown.
  • To expressly exclude a field from the copy, map it to an empty string or undefined (examples: {fieldname:""} or {fieldname:undefined}).

The format of parameter 4 is: [ {field mappings} , [child table 1 spec] , [child table 2 spec] , … ]

{field mappings} are optional; if specified, they should be the first element (index #0) of the array.

If child tables are specified in parameter 4, all the child rows of the selected row will be copied to the specified destination child table. Each specified child table must have a foreign relational link to the selected row’s table (child, grandchild, great-grandchild, etc.). The field mapping rules listed above also apply to the child table specification.

ContextParameter 4
Copy all fields
No field mapping
No child tables
n/a
Copy selected fields[{customerid:"originalCustomerid",orderDate:"dateOrdered"}]
Copy all fields
One child table
No child mapping
[["order_item","order_item_history"]]
Copy all fields
One child table
Child mapping
[["order_item","order_item_history",{unitPrice:"price",quantity:"qty"}]]
Copy selected fields
One child table
No child mapping
[{customerid:"originalCustomerid",orderDate:"dateOrdered"},
["order_item","order_item_history"]]
Copy selected fields
One child table
Child mapping
[{customerid:"originalCustomerid",orderDate:"dateOrdered"},
["order_item","order_item_history",{unitPrice:"price",quantity:"qty"}]]

HTML Class Attribute

The button of the copyButton field is an HTML button element. The HTML class attribute of the button is a set of six classes:

"dbiButton dbiCopyButtonField dbi[ Inline | Drilldown ] dbi[ Display | Edit ] dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiCopyButtonField dbiInline dbiDisplay dbiTablePatient dbiFieldArchive"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendData

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
Virtual Field NameStringThe name of the virtual field. A calculate data-driven function must be specified for a virtual field.
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
LASTOptional PropertiesNoObjectInherited Properties
See Boolean Field Properties.
See Datetime Field Properties.
See Memo Field Properties.
See Money Field Properties.
See Number Field Properties.
See String Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The type of field added by the appendData functions is determined by the data type of the database field.

Boolean (Bit)

See .appendBoolean.

Datetime (Date, Timestamp)

The following table details the effects of the Datetime field properties on its GUI.

.showTime.showSeconds.showTimeZoneGUI Representation
TrueTrueTrueDSAT JAN 01 2000 @ MIDNIGHT Eastern Daylight Time
EDatetime GUI Example
TrueTrueFalseDSAT JAN 01 2000 @ MIDNIGHT
EDatetime GUI Example
TrueFalseTrueDSAT JAN 01 2000 @ MIDNIGHT Eastern Daylight Time
EDatetime GUI Example
TrueFalseFalseDSAT JAN 01 2000 @ MIDNIGHT
EDatetime GUI Example
FalseFalseFalseDSAT JAN 01 2000
EDatetime GUI Example
D: Display GUI, E: Edit GUI

The following table lists the browser-dependent keyboard shortcuts available to the date input.

Internet Explorer, Firefox, Apple Safari, OperaGoogle Chrome
Key CombinationEffectKey CombinationEffect
Ctrl + HomeToday’s dateAlt + HomeToday’s date
EscHide calendarEscHide calendar
InsertShow / hide calendarInsertShow / hide calendar
Ctrl + Left ArrowSubtract one dayAlt + Left ArrowSubtract one day
Ctrl + Right ArrowAdd one dayAlt + Right ArrowAdd one day
Up ArrowSubtract one weekUp ArrowSubtract one week
Down ArrowAdd one weekDown ArrowAdd one week
Page UpSubtract one monthPage UpSubtract one month
Page DownAdd one monthPage DownAdd one month
Ctrl + Page UpSubtract one yearAlt + Page UpSubtract one year
Ctrl + Page DownAdd one yearAlt + Page DownAdd one year

In Google Chrome, the Alt key must be used for the key combinations because the Ctrl + Page Up and Ctrl + Page Down key combinations are non-overridable browser shortcuts for changing tabs.

The interactive calendar is displayed whenever a date input has the focus. Clicking on the month or year of the calendar displays a scrollable month picker which lists consecutive months or years, respectively from the current month. In action, the month picker appears directly over the calendar but is shown here separately for clarity.

The Interactive Calendar and the Two Versions of the Month Picker

Datetime Interactive CalendarDatetime Month PickerDatetime Month Picker

Additionally, clicking on the right-pointing arrow at the top of the calendar sets the display of the calendar forward by one month, or by one year if the arrow is clicked while holding down the Shift, Ctrl, or Alt keys. Similarly, clicking on the left-pointing arrow at the top of the calendar sets the display of the calendar back by one month, or by one year if the arrow is clicked while holding down the Shift, Ctrl, or Alt keys.

Memo

See .appendMemo.

Money (Currency)

See .appendMoney.

Number (Decimal, Double, Float, Numeric, Real, Single)

The Number field displays as simple text and edits in a textbox with optional clickable incrementers and decrementers for each digit of the number.

The Numeric Field Edit GUI

Numeric Field Edit GUI

String (Char, Varchar)

The String field displays as simple text and edits in a regular textbox. String fields of 100 or more characters in length (defined size of the database field) are converted to Memo fields.

The optional inputMask property affects the field input and display according to the rules of the following table:

CharacterDescription
9Digit (0 through 9; plus [+] and minus [-] signs not allowed).
DDigit or space (plus and minus signs not allowed).
SDigit or space (plus and minus signs allowed).
LLetter (A through Z; case insensitive).
MLetter or a space.
ALetter or a digit.
BLetter, digit or a space.
CAny character or a space.
EAny character except a space.
<Converts subsequent characters to lowercase.
>Converts subsequent characters to uppercase.
!The input mask is applied from right to left, rather than from left to right. The exclamation mark can appear anywhere in the input mask.
Example: "![(999)]-[999-9999]"
This input mask accepts the input of either 7 or 10 digits. The displayed value is that of a North American phone number with the area code being optional.
[ ]Defines a required group where the user must either enter all or none of the enclosed characters. In the preceding example for the exclamation mark, the two groupings ensure that the user enters either 7 or 10 digits.
`Used in conjunction with any of the preceding characters listed in this table to display a literal character (e.g. `A displays as just A). Note that this is the "grave accent" character and not the "single quote" character.
Any other characterOther characters (and ` literals) do not affect the input; they appear in the displayed value of the field.

HTML Class Attribute

The HTML class attribute of the boolean, memo, and money field types are discussed in their respective sections. Here we’ll discuss the datetime, number, and string field types.

In display mode, the text of the datetime, number, and string fields is an HTML div element. The HTML class attribute of the div is a set of six classes:

Datetime Display Mode

"dbiText dbiDatetimeField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiDatetimeField dbiInline dbiDisplay dbiTablePatient dbiFieldDob"

Number Display Mode

"dbiText dbiNumberField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiNumberField dbiDrilldown dbiDisplay dbiTableOrder dbiFieldQuantity"

String Display Mode

"dbiText dbiStringField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiStringField dbiInline dbiDisplay dbiTablePatient dbiFieldFirstName"

In edit mode, the input of the datetime, number, and string fields is an HTML input element. The HTML class attribute of the input is a set of six classes, seven in the case of the datetime field. The datetime field also optionally includes an AM / PM button.

Datetime Edit Mode

Date Input
"dbiInput dbiInputDate dbiDatetimeField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiInput dbiInputDate dbiDatetimeField dbiInline dbiEdit dbiTablePatient dbiFieldDob"
Time Input (Optional)
"dbiInput dbiInputTime dbiDatetimeField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiInput dbiInputTime dbiDatetimeField dbiDrilldown dbiEdit dbiTableOrder dbiFieldDttm"
Time AM / PM Button (Optional)
"dbiButton dbiDatetimeField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiDatetimeField dbiDrilldown dbiEdit dbiTableOrder dbiFieldDttm"

Number Edit Mode

"dbiInput dbiNumberField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiInput dbiNumberField dbiDrilldown dbiEdit dbiTableOrder dbiFieldQuantity"

String Edit Mode

"dbiInput dbiStringField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiInput dbiStringField dbiInline dbiEdit dbiTablePatient dbiFieldFirstName"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendEmail

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
Virtual Field NameStringThe name of the virtual field. A calculate data-driven function must be specified for a virtual field.
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
LASTOptional PropertiesNoObjectInherited Properties
See Email Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

In display mode, the Email field provides an HTML mailto: anchor which spawns a new email to the specified address through the user’s email client. In edit mode, the field control is a simple textbox with built-in warning-level validation of the entered email address.

HTML Class Attribute

In display mode, the text of the email field is an HTML a (anchor) element. The HTML class attribute of the anchor is a set of six classes:

"dbiAnchor dbiEmailField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiAnchor dbiEmailField dbiDrilldown dbiDisplay dbiTablePatient dbiFieldEmail"

In edit mode, the input of the email field is an HTML input element. The HTML class attribute of the input is a set of six classes:

"dbiInput dbiEmailField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiInput dbiEmailField dbiDrilldown dbiEdit dbiTablePatient dbiFieldEmail"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendFileVault

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesStringThe name of the field in the database.
This field stores a description of the file.
Virtual Field NameThe name of the virtual field.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3File Table InfoYesStringThe name of the File Table.If the File Table contains identity fields then an array with values for each identity field must be used.
Array of StringsThe first element of the array is the name of the File Table and the subsequent elements are the identity field values.
4Folder PathYesStringThe relative path from the dbiScript.js file to the folder where the files are stored. Note that either "/" or "\\" can be used as the directory separator – the double "\" is required because JavaScript’s escape character is "\".
LASTOptional PropertiesNoObjectInherited Properties
See FileVault Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

In display and edit mode, the FileVault field provides a clickable download: anchor which downloads the specified file to the user’s hard drive. In edit mode, additional controls are provided for checking the file in or out and also for uploading a new file which replaces any existing file for the field.

The FileVault Field Edit GUI

FileVault Edit GUI

HTML Class Attribute

Display Mode

The display mode fileVault field control consists of an anchor and, if the file has been checked out, a text element which displays the username and datetime when the file was checked out.

Anchor

The anchor is an HTML a (anchor) element. The HTML class attribute of the anchor is a set of six classes:

"dbiAnchor dbiFileVaultField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiAnchor dbiFileVaultField dbiDrilldown dbiDisplay dbiTablePatient dbiFieldFile"
Text

The text is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiFileVaultField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiFileVaultField dbiDrilldown dbiDisplay dbiTablePatient dbiFieldFile"

Edit Mode

The edit mode fileVault field control consists of the parts illustrated above:

Clear Image

The clear image is an HTML div element. The HTML class attribute of the div is a set of seven classes:

"dbiImage dbiImageClear dbiFileVaultField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiImage dbiImageClear dbiFileVaultField dbiDrilldown dbiEdit dbiTablePatient dbiFieldFile"
Anchor

The anchor is an HTML a (anchor) element. The HTML class attribute of the anchor is a set of six classes:

"dbiAnchor dbiFileVaultField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiAnchor dbiFileVaultField dbiDrilldown dbiEdit dbiTablePatient dbiFieldFile"
Text

The text is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiFileVaultField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiFileVaultField dbiDrilldown dbiEdit dbiTablePatient dbiFieldFile"
Check In / Out Button

The check in / out button is an HTML button element. The HTML class attribute of the button is a set of seven classes:

"dbiButton dbiButtonCheckInOut dbiFileVaultField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiButtonCheckInOut dbiFileVaultField dbiInline dbiEdit dbiTablePatient dbiFieldFile"
Upload Image

The upload image is an HTML div element. The HTML class attribute of the div is a set of seven classes:

"dbiImage dbiImageUpload dbiFileVaultField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiImage dbiImageUpload dbiFileVaultField dbiDrilldown dbiEdit dbiTablePatient dbiFieldFile"
File Button

The file button is an HTML button element. The HTML class attribute of the button is a set of seven classes:

"dbiButton dbiButtonFile dbiFileVaultField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiButtonFile dbiFileVaultField dbiInline dbiEdit dbiTablePatient dbiFieldFile"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendIconlist

ParameterRequired?Data TypeDescription / Notes
#Name
1Virtual Field NameYesStringThe name of the virtual (calculated) field.
The Iconlist field is either used with a link table (parameter 5) or a calculate data-driven function. In either case, the field is virtual and not tied to a physical field in its parent table.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Folder PathYesStringThe relative path to the folder where the images are stored. Note that either "/" or "\\" can be used as the directory separator – the double "\" is required because JavaScript’s escape character is "\".
4ImagesYesArray of Strings or ArraysA list of the images (filenames) used by the control.
Each specified image may be a sprite sheet. For each specified sprite sheet, an array may optionally be used to indicate only selected sprites from the sheet are to be used for the field. For example, [["sprites.png",0,2,3]] would add sprites at indexes 0, 2 & 3 from "sprites.png" to the field’s list of icons. See the .sprites property for details.
5Link Table InfoYes*StringThe name of the Link Table.If the Link Table contains identity fields then an array with values for each identity field must be used.
Array of StringsThe first element of the array is the name of the Link Table and the subsequent elements are the identity field values.
LASTOptional PropertiesNoObjectInherited Properties
See Iconlist Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

* Parameter 5 (Link Table Info) is required unless the field is a calculated field. See the Iconlist’s calculate data-driven function for more information on calculated Iconlists.

The following table details the effects of the .type property on the Iconlist GUI.

.typeDisplay GUIEdit GUI
"allstatic"allstatic Display GUIallstatic Edit GUI
"static"static Display GUIstatic Edit GUI
"dynamic"dynamic Display GUIdynamic Edit GUI

The individual icons of the edit mode "dynamic" Iconlist GUI can be rearranged by dragging and dropping them to a new position.

If the field’s data-driven calculate function exists, the Iconlist field is read-only and the edit mode GUI is identical to the display mode GUI. Parameter 3 is ignored if the field’s data-driven calculate function exists. If the field’s data-driven calculate function does not exist, then parameter 3 is required.

The value stored as the childid in the link table is the index of the image in the array of parameter 5. If the array of parameter 5 is changed after rows have been added to your application, the childid values may need to be manually adjusted in order to display the same icons after the change to the array.

HTML Class Attribute

In display mode, each image of the iconlist field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiImage dbiIconlistField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiImage dbiIconlistField dbiDrilldown dbiDisplay dbiTablePatient dbiFieldIcons"

In edit mode, each button of the iconlist field is an HTML button element. The HTML class attribute of the button is a set of six classes:

"dbiButton dbiIconlistField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiIconlistField dbiDrilldown dbiEdit dbiTablePatient dbiFieldIcons"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendMemo

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the character-type field in the database table.
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Optional PropertiesNoObjectInherited Properties
See Memo Field Properties.
See Drilldown Field Properties.

The Memo field displays as simple text and edits in a multi-row textarea. The memo field can be used with any character-type field such as varchar, long varchar, and longtext.

HTML Class Attribute

In display mode, the text of the memo field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiMemoField dbiDrilldown dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiMemoField dbiDrilldown dbiDisplay dbiTablePatient dbiFieldNotes"

In edit mode, the textarea of the memo field is an HTML textarea element. The HTML class attribute of the textarea is a set of six classes:

"dbiTextarea dbiMemoField dbiDrilldown dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiTextarea dbiMemoField dbiDrilldown dbiEdit dbiTablePatient dbiFieldNotes"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendMemoPreview

Memopreview Fields Are Read-Only
ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesStringThe name of the character-type field in the database table.
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
LASTOptional PropertiesNoObjectInherited Properties
See MemoPreview Field Properties.
See Inline Field Properties.

The MemoPreview field displays a fixed number of characters from the beginning of a memo field value.

HTML Class Attribute

In display mode, the text of the memo field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiMemoPreviewField dbiInline dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiMemoPreviewField dbiInline dbiDisplay dbiTablePatient dbiFieldNotes"

The textarea field does not have an edit mode control.

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendMoney

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
Virtual Field NameStringThe name of the virtual field. A calculate data-driven function must be specified for the field.
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
LASTOptional PropertiesNoObjectInherited Properties
See Money Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The Money field displays as a currency formatted number (e.g. $100.00) and edits in a textbox with clickable incrementers and decrementers for each digit of the number.

HTML Class Attribute

In display mode, the text of the money field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiMoneyField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiMoneyField dbiDrilldown dbiDisplay dbiTableOrderItem dbiFieldTotal"

In edit mode, the input of the money field is an HTML input element. The HTML class attribute of the input is a set of six classes:

"dbiInput dbiMoneyField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiInput dbiMoneyField dbiDrilldown dbiEdit dbiTableOrderItem dbiFieldTotal"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendMoveButton

ParameterRequired?Data TypeDescription / Notes
#Name
1Virtual Field NameYesStringThe name of the virtual field.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Destination TableNoStringThe name of the table to copy the data to.
If this parameter is omitted, the default [table name] + "_archive" (i.e. "patient_archive") is used.
4Field Mappings
and
Child Table Specs
NoArrayField Mappings
Object in the form:
{"field source":"field destination", … }
Child Table Specs
Array in the form:
["child table source", "child table destination", {"child field source":"child field destination", … }]
where "child table source" and "child table destination" are required while the field mapping is optional.
LASTOptional PropertiesNoObjectInherited Properties
See MoveButton Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

A row cannot be moved while it is in edit mode; the move button appears only when the row is in display mode.

The selected row will be moved to a new row in the destination table. The destination table does not need to be included in the dbiScript application definition.

A move essentially copies a row from a source table to a destination table and then deletes the row from the source table. Any descendant (child, grand-child, etc.) rows of the source row will be cascade deleted. In order to preserve the descendant rows, all descendant tables must be mapped to destination tables in parameter 4. The descendant rows in any tables which are not mapped will be lost when the parent row is moved.

If the destination table contains audit columns (create_dttm, create_userid, update_dttm & update_userid), these fields will not be copied from the source table; they will be populated with the id of the user who moved the row and the datetime of the move.

The primary key column of the destination table must have the same name as that of the original table ("pid" by default) and it must be an auto-generated integer. This column does not store the primary key of the original row; it is a unique id for the moved row. When child tables are included in the move, this new id is used in place of the child’s foreign id to the parent moved row and the primary ids of any child rows will also be auto-generated integers unique to their moved rows (this procedure is continued through all descendant tables).

If you wish to preserve the original primary id in the moved row, there are two options:

  • Include an integer column named "original_pid" in the columns of the destination table; dbiScript will automatically fill the field with the original primary id unless a field named "original_pid" also exists in the source table in which case the source field value takes precedence.
  • Map the primary key to the desired field name in parameter 4, e.g., {pid:"old_pid"}.

All descendant rows are moved in conjunction with the selected row. The descendant tables do not need to be listed in parameter 4 as long as each descendant destination table follows the naming convention [table name] + "_archive". If a different naming convention is desired, specify the destination table names in parameter 4. If a destination table cannot be found in the database, you will receive a "table not found" error message.

All foreign id columns in each child source table must have the same name in its destination table with the exception of foreign ids that relate to tables not included in the copy; any foreign id in any table of the move that relates to a table not included in the move will retain its original value.

If you wish to preserve the original foreign ids of descendant tables, there are two options:

  • Include in the columns of the destination table an integer column named "original_" + the column name in the source table, e.g., "original_employeeid"; dbiScript will automatically fill the field with the original foreign id unless a field with that name also exists in the source table in which case the source field value takes precedence.
  • Map the foreign id to the desired field name in parameter 4, e.g., {employeeid: "old_employeeid"}.

The field mapping rules are as follows:

  • dbiScript will attempt to move all fields from the source table to the destination table.
  • The fields of the destination table must have the same names as those of the source table unless the fields are mapped.
  • If a specified field cannot be found in the destination table, the field will be ignored unless it has been mapped in which case an error will be thrown.
  • To expressly exclude a field from the copy, map it to an empty string or undefined (examples: {fieldname:""} or {fieldname:undefined}).

The format of parameter 4 is: [ {field mappings} , [child table 1 spec] , [child table 2 spec] , … ]

{field mappings} are optional; if specified, they should be the first element (index #0) of the array.

If child tables are specified in parameter 4, all the child rows of the selected row will be moved to the specified destination child table. Each specified child table must have a foreign relational link to the selected row’s table (child, grandchild, great-grandchild, etc.). The field mapping rules listed above also apply to the child table specification.

Several examples of parameter 4 are listed in this table.

HTML Class Attribute

The button of the moveButton field is an HTML button element. The HTML class attribute of the button is a set of six classes:

"dbiButton dbiMoveButtonField dbi[ Inline | Drilldown ] dbi[ Display | Edit ] dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiMoveButtonField dbiInline dbiDisplay dbiTablePatient dbiFieldArchive"

Please see HTML Classes for more information on uses of the HTML class attribute.

Field Functions (P - W)

.appendPercentage

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
Virtual Field NameStringThe name of the virtual field. A calculate data-driven function must be specified for the field. Note that when using a calculate data-driven function with a Percentage field, the value returned by the function must be the percentage as a decimal (i.e. return .01 to have 1% displayed).
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
LASTOptional PropertiesNoObjectInherited Properties
See Percentage Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The Percentage field displays as a percentage formatted number (e.g. 25%) and edits in a textbox with clickable incrementers and decrementers for each digit of the number. Note that the display and edit value of the field is a percentage (typically 0 – 100%) while the stored value of the field is a decimal (typically 0 – 1). The value passed to any field-level data-driven function is the stored value (typically 0 – 1).

HTML Class Attribute

In display mode, the text of the percentage field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiPercentageField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiPercentageField dbiDrilldown dbiDisplay dbiTableOrderItem dbiFieldDiscount"

In edit mode, the input of the percentage field is an HTML input element. The HTML class attribute of the input is a set of six classes:

"dbiInput dbiPercentageField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiInput dbiPercentageField dbiDrilldown dbiEdit dbiTableOrderItem dbiFieldDiscount"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendPhotoAlbum

ParameterRequired?Data TypeDescription / Notes
#Name
1Photo Album NameYesStringThe photo album name is used internally for group account security. The name must be unique within its table’s photo albums as well as the table’s fields.
2Album CaptionYesStringThe caption to display for the photo album.
3Folder PathYesStringThe relative path from the dbiScript.js file to the folder where the images are stored. Note that either "/" or "\\" can be used as the directory separator – the double "\" is required because JavaScript’s escape character is "\".
4Photo Table InfoNoStringThe name of the Photo Table.If the Photo Table contains identity fields then an array with values for each identity field must be used.
Array of StringsThe first element of the array is the name of the Photo Table and the subsequent elements are the identity field values.

The Photo field provides a rich user interface for viewing and organizing albums of photos.

A Photo Album in Display Mode and Edit Mode

Photo Album Display GUIPhoto Album Edit GUI

The display of the photo album collection is toggled on/off via the Show Photos toolbar button [ Show Photos Toolbar Button ]. Clicking on a photo launches the Album Browser or the Album Organizer while the album’s row is in display mode or edit mode, respectively. The album navigation controls provide controls to navigate to the first photo in the album ( A ), the previous photo ( B ), the next photo ( D ), the last photo ( E ) and also displays the position of the displayed photo within the album ( C ). While in edit mode, photos can be added to [ Add Photo Button ] and deleted from [ Delete Photo Button ] the row’s Photo Album.

The Album Navigation Controls

Photo Album Navigation Controls

The Album Browser

Photo Album Browser

The Album Browser is launched by clicking a photo in the display mode Photo Album or double-clicking a photo in the Album Organizer. The photos of the Album Browser can be navigated via GUI controls and by the keyboard shortcuts listed in the table below. Clicking on the large white arrows displayed to the left and right of the selected photo will navigate to the previous and next photo, respectively. The thumbstrip can be scrolled to the left or right by clicking on the arrows displayed at either end of it; using the ctrl key in conjunction with the left or right arrow will scroll the thumbstrip to its beginning or end, respectively. The display of the thumbstrip is toggled off/on via the [ Hide Thumbstrip Button ] and [ Show Thumbstrip Button ] controls, respectively.

Album Broswer Keyboard Shortcuts

Key CombinationEffect
EscClose the album browser.
Page Up
Up Arrow
Go to the previous photo.
Page Down
Down Arrow
Go to the next photo.
HomeGo to the first photo.
EndGo to the last photo.
Left ArrowScroll thumbstrip left.
Right ArrowScroll thumbstrip right.

The Album Organizer

Photo Album Organizer

The Album Organizer is launched by clicking a photo in the edit mode Photo Album. Clicking on a thumbnail in the Album Organizer will select the thumbnail. Clicking on the caption of a selected thumbnail will edit the caption. When editing a caption, pressing the Enter key will save the changes while pressing the Esc key will exit the edit mode without saving the changes. Double-clicking the photo of a thumbnail will launch the Album Browser. As shown above, thumbnails can be dragged and dropped to a new position in the album. While dragging a thumbnail, pressing the Esc key will exit the drag operation without performing a drop. The Photo Album and the Album Browser display photos in the saved order of the Album Organizer. The functionality of the Album Organizer’s toolbar buttons and keyboard shortcuts are detailed in the following tables.

Album Organizer Toolbar Buttons

ControlEffect
Display Large Thumbnails ButtonDisplay large thumbnails (300 px).
Display Medium Thumbnails ButtonDisplay medium thumbnails (200 px).
Display Small Thumbnails ButtonDisplay small thumbnails (100 px).
Sort Thumbnails by Saved Order ButtonSort thumbnails by saved order.
Sort Thumbnails by Reverse Saved Order ButtonSort thumbnails by reverse saved order.
Sort Thumbnails by Caption / Filename ButtonSort thumbnails by caption / filename.
Sort Thumbnails by Reverse Caption / Filename ButtonSort thumbnails by reverse caption / filename.
Sort Thumbnails by Caption / Filename and Save the Order ButtonSort thumbnails by caption / filename and save the order.
Upload a New Photo ButtonUpload a new photo.
Delete Selected Photo ButtonDelete the selected photo.

Album Organizer Keyboard Shortcuts

Key CombinationEffect
EscClose the album organizer.
F2Edit caption.
Left ArrowSelect previous thumbnail.
Right ArrowSelect next thumbnail.
Up ArrowSelect thumbnail one row up.
Down ArrowSelect thumbnail one row down.

.appendPicklist

ParameterRequired?Data TypeDescription / Notes
#Name
1Virtual Field NameYesStringThe name of the virtual field.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Definition Table InfoYesStringThe name of the Definition Table.If the Definition Table contains identity fields then an array with values for each identity field must be used.
Array of StringsThe first element of the array is the name of the Definition Table and the subsequent elements are the identity field values.
4Link Table InfoYesStringThe name of the Link Table.If the Link Table contains identity fields then an array with values for each identity field must be used.
Array of StringsThe first element of the array is the name of the Link Table and the subsequent elements are the identity field values.
LASTOptional PropertiesNoObjectInherited Properties
See Picklist Field Properties.
See Drilldown Field Properties.

The Picklist field enables the user to select a sublist of items from a master list and display the sublist in string or table format as shown below. In edit mode, the selected sublist is modified via the Picklist Field Dialog.

Display of Picklist with .type = "string"

Picklist Display for string

Display of Picklist with .type = "table"

Picklist Display for table

The Picklist Field Dialog

Picklist Field Dialog

HTML Class Attribute

Display Mode

In display mode, the text of the picklist field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiPicklistField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiPicklistField dbiDrilldown dbiDisplay dbiTableSdrmst dbiFieldSpecialtyids"

Edit Mode

The edit mode picklist field control consists of a text element and a windowOpener button.

Text

The text is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiPicklistField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiPicklistField dbiDrilldown dbiEdit dbiTableSdrmst dbiFieldSpecialtyids"
WindowOpener Button

The windowOpener button is an HTML button element. The HTML class attribute of the button is a set of seven classes:

"dbiButton dbiButtonWindowOpener dbiPicklistField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiButtonWindowOpener dbiPicklistField dbiDrilldown dbiEdit dbiTableSdrmst dbiFieldSpecialtyids"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendQuickpick

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
Virtual Field NameStringThe name of the virtual field.
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Definition Table InfoNoStringThe name of the Definition Table.If the Definition Table contains identity fields then an array with values for each identity field must be used.
Array of StringsThe first element of the array is the name of the Definition Table and the subsequent elements are the identity field values.
LASTOptional PropertiesNoObjectInherited Properties
See Quickpick Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The Quickpick field displays as simple text and edits in a textbox with a companion button. As the user types in the edit mode textbox, a list of matching items is displayed below the textbox. The button provides some information as to the state of the field data and also toggles the display of the list of matching items. The keyboard shortcuts listed in the table below only apply when a list of matching items is displayed.

If the definition table info (parameter 3) is not specified, the quickpick is based on the existing data of the field in the database. This type of quickpick is useful for fields where the same value is often repeated such as a city name. New entries are always allowed in field-based quickpicks whereas the .allowNew setting determines whether or not new entries are allowed in definition-based quickpicks.

An Example of the Quickpick Field Edit GUI

Quickpick Edit GUI Example

The Buttons of the Quickpick Field Edit GUI

ButtonClickable?Meaning
Quickpick Edit ButtonNoNo matches. New items are not allowed. The row cannot be saved.
Quickpick Edit ButtonNoNo matches. A new item will be added when the row is saved.
Quickpick Edit ButtonNoOne exact match.
Quickpick Edit ButtonYesOne exact match plus one or more partial matches.
Quickpick Edit ButtonYesOne or more partial matches. The row cannot be saved until an item is selected from the list.
Textbox StateMeaning
EmptyField is required.
Not EmptyNew items are not allowed.
Quickpick Edit ButtonYesOne or more partial matches.
Textbox StateMeaning
EmptyField is not required.
Not EmptyA new item will be added when the row is saved.

Quickpick Input Keyboard Shortcuts

Key CombinationEffect
EscHide the list of matching items.
Up ArrowSelect the previous item in the list of matching items.
Down ArrowSelect the next item in the list of matching items.
TabNew Entries Allowed?Effect
YesAdvance focus to the next field.
NoSet the textbox value = text of selected item in the list of matching items.
EnterSet the textbox value = text of selected item in the list of matching items.

HTML Class Attribute

Display Mode

In display mode, the text of the quickpick field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiQuickpickField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiQuickpickField dbiInline dbiDisplay dbiTablePatient dbiFieldCity"

Edit Mode

The edit mode quickpick field control consists of an input element, a set of images and a select element.

Input

The input is an HTML input element. The HTML class attribute of the input is a set of six classes:

"dbiInput dbiQuickpickField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiInput dbiQuickpickField dbiInline dbiEdit dbiTablePatient dbiFieldCity"
Images

Each image is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiImage dbiQuickpickField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiImage dbiQuickpickField dbiInline dbiEdit dbiTablePatient dbiFieldCity"
Select

The select is an HTML select element. The HTML class attribute of the select is a set of six classes:

"dbiSelect dbiQuickpickField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiSelect dbiQuickpickField dbiInline dbiEdit dbiTablePatient dbiFieldCity"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendRadio

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Definition Table InfoYesStringThe name of the Definition Table.If the Definition Table contains identity fields then an array with values for each identity field must be used.
Array of StringsThe first element of the array is the name of the Definition Table and the subsequent elements are the identity field values.
Hard-coded OptionsObjectAn object representing the list of values in the form
{"stored value":"displayed value", … }
Example: {M:"Male",F:"Female"}
4Linked Parent InfoNoStringParent field name – for hard-coded radios
Array of StringsIndexRequired?Description / Notes
0YesParent field name
1YesLink table name
2+NoLink identity field values
Specify the linked parent info only when the content of the select is dependent on the value of a parent field. The parent field must be either a radio field or a select field.
LASTOptional PropertiesNoObjectInherited Properties
See Radio Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The Radio field displays as simple text and edits in a radio button group.

Linking To a Parent Element

The linked parent info (parameter 4) specifies a parent radio or select element which controls the options available in the child radio element. For example, a parent field might contain a list of countries with it linked to a child radio that lists the common languages of the selected country. A parent element may be linked to one or more child radio (and/or select) elements. A child radio element can have only one parent element. A child radio element may also be parent to other child radio or select elements.

When linking to a parent element, the child data may be populated from a definition table or hard-coded. The child data source must be the same type (definition-based or hard-coded) as its parent. If a definition table is used, then parameter 4 must specify the link table information. If hard-coded values are used, then the required format for the child data (parameter 3) is:

{p1:{p1c1:"One One", p1c2:"One Two", … }, p2:{p2c1:"Two One", p2c2:"Two Two", … }, … }

For example, data for the countries & languages scenario from above:

Parent element: {CAN:"Canada",US:"United States"}

Child radio element: {CAN:{ENG:"English",FRE:"French"},US:{ENG:"English",SPA:"Spanish"}}

This example only illustrates the data structure.

Linking To a Parent Element In Another Table

If the parent element is in another table, specify the parent field name using the syntax "[table name].[field name]", e.g., "patient.country". The table containing the parent element must be an ancestor of the table containing the child radio element (related either directly through the child table’s foreign keys or through other intermediary tables’ foreign keys).

When a parent element is linked to a child radio element in another table, the user cannot change the value of the parent element once child rows have been created in the child table. When [parent element].isRequired is true, child rows cannot be created in the child table until a value has been selected in the parent element.

Notes

Radio fields do not support the ability to add new items. When creating a definition-based radio field, you may find it easier to start with a select field (with .allowNew = true) during development and possibly into early deployment and then change the field type to radio once the field values have been established.

HTML Class Attribute

Display Mode

In display mode, the text of the radio field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiRadioField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiRadioField dbiDrilldown dbiDisplay dbiTablePatient dbiFieldGender"

Edit Mode

The edit mode radio field control consists of a set of radio buttons. Each radio button includes a radio input and a text label.

Radio Input

The radio input is an HTML input element of type radio. The HTML class attribute of the input is a set of six classes:

"dbiRadio dbiRadioField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiRadio dbiRadioField dbiDrilldown dbiEdit dbiTablePatient dbiFieldGender"
Text Label

The label is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiRadioField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiRadioField dbiDrilldown dbiEdit dbiTablePatient dbiFieldGender"

.appendReference

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Referenced Table NameYesStringThe name of the referenced table.
4Referenced FieldsYesStringA list of field names from the referenced table listed in the order they will be passed to the field’s data-driven format function(s). An array of strings is required if more than one field is referenced; if only one field is referenced it can be specified as a string.
If more than one field is specified, the order in which the fields are listed affects the sort order of the field. See .isSortExtended.
Array of Strings
LASTOptional PropertiesNoObjectInherited Properties
See Reference Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The Reference field displays a string representing a row selected from another table. The displayed string is calculated by passing the specified fields from the referenced table to the field’s data-driven format function(s). When using a reference field with .type = "quickpop" or .type="quickpick", one or more data-driven format functions can be used with the field; when .type = "poptable" only one data-driven format function may be used. When using only one data-driven format function, the naming convention [Data Table Name]_[Field Name]_format must be used. For multiple data-driven format functions, the functions must be consecutively numbered starting with 0 and following the naming convention [Data Table Name]_[Field Name]_format[N]. Multiple data-driven format functions are used for enabling quickpick searches of the referenced table by different orders of the referenced fields; left-clicking on the [ Format Cycle Button ] button cycles through the formats while right-clicking on the [ Format Context Menu Button ] button displays a context menu of all the formats. When using multiple data-driven format functions, the displayed value of the field is calculated using the first (N = 0) function. The table below lists examples of single and multiple data-driven format functions. If no data-driven function exists for the field, displayed value will be the reference field values concatenated with a space. Clicking the button of the reference field edit GUI will pop up the referenced table in a modal window.

If a data-driven format function is not defined for the reference field, dbiScript will use a concatenation of the values of the referenced fields with a separator of a single space (" ").

The Reference Field Edit GUI

Reference Edit GUI

An Example of a Popup Window

Reference Popup Window

Examples Of Reference Field Data-Driven Format Functions

Table NameField NameReference FieldsExample
"patient""rdrmstid"["lname","fname","mi"]["Carter","John","T"]
Single Data-Driven Format Function 
function patient_rdrmstid_format(s,t,u) {return s + ", " + t + (u?" " + u + ".":"");}"Carter, John T."
Multiple Data-Driven Format Functions 
function patient_rdrmstid_format0(s,t,u) {return s + ", " + t + (u?" " + u + ".":"");}
function patient_rdrmstid_format1(s,t,u) {return t + " " + (u?u + ". ":"") + s;}
"Carter, John T."
"John T. Carter"

HTML Class Attribute

Display Mode

The display mode reference field control consists of a foreignRowToggle button and a text element.

ForeignRowToggle Button

The foreignRowToggle button is an HTML button element. The HTML class attribute of the button is a set of seven classes:

"dbiButton dbiButtonForeignRowToggle dbiReferenceField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiButtonForeignRowToggle dbiReferenceField dbiDrilldown dbiDisplay dbiTablePatient dbiFieldSdrmstid"
Text

The text is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiReferenceField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiReferenceField dbiDrilldown dbiDisplay dbiTablePatient dbiFieldSdrmstid"

Edit Mode

The edit mode quickpick field control consists of a foreignRowToggleButton, an optional reorder button, either a clear image and a text element or an input element, and a windowOpener button.

ForeignRowToggle Button

The foreignRowToggle button is an HTML button element. The HTML class attribute of the button is a set of seven classes:

"dbiButton dbiButtonForeignRowToggle dbiReferenceField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiButtonForeignRowToggle dbiReferenceField dbiDrilldown dbiEdit dbiTablePatient dbiFieldSdrmstid"
Reorder Button

The reorder button is an HTML button element. The HTML class attribute of the button is a set of seven classes:

"dbiButton dbiButtonReorder dbiReferenceField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiButtonReorder dbiReferenceField dbiDrilldown dbiEdit dbiTablePatient dbiFieldSdrmstid"
Clear Image

The clear image is an HTML div element. The HTML class attribute of the div is a set of seven classes:

"dbiImage dbiImageClear dbiReferenceField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiImage dbiImageClear dbiReferenceField dbiDrilldown dbiEdit dbiTablePatient dbiFieldSdrmstid"
Text

The text is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiReferenceField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiReferenceField dbiDrilldown dbiEdit dbiTablePatient dbiFieldSdrmstid"
Input

The input is an HTML input element. The HTML class attribute of the div is a set of six classes:

"dbiInput dbiReferenceField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiInput dbiReferenceField dbiDrilldown dbiEdit dbiTablePatient dbiFieldSdrmstid"
WindowOpener Button

The windowOpener button is an HTML button element. The HTML class attribute of the button is a set of seven classes:

"dbiButton dbiButtonWindowOpener dbiReferenceField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiButtonWindowOpener dbiReferenceField dbiInline dbiEdit dbiTablePatient dbiFieldSdrmstid"

.appendRowState

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
LASTOptional PropertiesNoObjectInherited Properties
See RowState Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The RowState field displays an icon representing a user-selected state. In edit mode, the states are cycled through by clicking on the button.

The data type of the database field can be boolean (default) or integer. The boolean data type is supported by SQL Server (bit), MS Access (Yes/No), MySQL (boolean, tinyint(1)), PostgreSQL (boolean) and SQL Anywhere (bit). A boolean field can only be used with a two-state or three-state (including null) RowState field. The number of states in the RowState field is equal to the number of images specified in the .icons array plus 1 if the field allows nulls. A null value is represented by a blank space in the display GUI and a button with a blank face in the edit GUI. Note that MS Access does not support nulls on boolean fields so you will need to specify an integer field if you are using MS Access and need a three value RowState field.

Inline RowState fields include a filter button in the column header. The filter button is displayed in addition to the field caption, if specified. The filter button cycles through the same states as the field value button. The filter button’s blank state is equivalent to ‘no filter’. The other states filter the table’s rows to display only those rows where the field value matches the filter state. By default, the initial filter state is 0; the first icon in the field’s .icons property. This can be changed by setting the field’s .initialFIlterState property to a different index of the .icons array.

HTML Class Attribute

In display mode, the image of the rowState field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiImage dbiRowStateField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiImage dbiRowStateField dbiDrilldown dbiDisplay dbiTablePatient dbiFieldRetired"

In edit mode, the button of the rowState field is an HTML button element. The HTML class attribute of the button is a set of six classes:

"dbiButton dbiRowStateField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiRowStateField dbiDrilldown dbiEdit dbiTablePatient dbiFieldRetired"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendSectionHeader

ParameterRequired?Data TypeDescription / Notes
#Name
1Virtual Field NameYesStringThe name of the field in the database table.
2Field CaptionYesStringThe text to display in the header. If an empty string ("") is specified, a thin line will be used instead of the wider bar that is used with text.

The section header inserts a horizontal break into the drilldown section of the table.

HTML Class Attribute

The text of the sectionHeader field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiAgeField dbi[ Inline | Drilldown ] dbi[ Display | Edit ] dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiAgeField dbiInline dbiDisplay dbiTablePatient dbiFieldAge"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendSelect

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Definition Table InfoYesStringThe name of the Definition Table.If the Definition Table contains identity fields then an array with values for each identity field must be used.
Array of StringsThe first element of the array is the name of the Definition Table and the subsequent elements are the identity field values.
Hard-coded OptionsObjectAn object representing the list of values in the form
{"stored value":"displayed value", … }
Example: {M:"Male",F:"Female"}
4Linked Parent InfoNoStringParent field name – for hard-coded selects
Array of StringsIndexRequired?Description / Notes
0YesParent field name
1YesLink table name
2+NoLink identity field values
Specify the linked parent info only when the content of the select is dependent on the value of a parent field. The parent field must be either a radio field or a select field.
LASTOptional PropertiesNoObjectInherited Properties
See Select Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The Select field displays as simple text and edits in a select element.

Linking To a Parent Element

The linked parent info (parameter 4) specifies a parent radio or select element which controls the options available in the child select element. For example, a parent field might contain a list of countries with it linked to a child select that lists the states/provinces of the selected country. A parent element may be linked to one or more child select (and/or radio) elements. A child select element can have only one parent element. A child select element may also be parent to other child select or radio elements.

When linking to a parent element, the child data may be populated from a definition table or hard-coded. The child data source must be the same type (definition-based or hard-coded) as its parent. If a definition table is used, then parameter 4 must specify the link table information. If hard-coded values are used, then the required format for the child data (parameter 3) is:

{p1:{p1c1:"One One", p1c2:"One Two", … }, p2:{p2c1:"Two One", p2c2:"Two Two", … }, … }

For example, data for the countries & states/provinces scenario from above:

Parent element: {CAN:"Canada",US:"United States"}

Child select element: {CAN:{ON:"Ontario",QC:"Quebec"},US:{CA:"California",NY:"New York"}}

This example only illustrates the data structure. To utilize this parent/child configuration in an application you would need to expand the child’s to include all (or most, depending on your application) 10 Canadian provinces and its 3 territories and the 50 American states plus its federal district and 14 dependent areas.

Expanding the example – data for a cities select element, child to the states/provinces select element:

{ON:{Barrie:"Barrie",Toronto:"Toronto"},QC:{Montreal:"Montreal",QuebecCity:"Quebec City"}}

Linking To A Parent Element In Another Table

If the parent element is in another table, specify the parent field name using the syntax "[table name].[field name]", e.g., "patient.country". The table containing the parent element must be an ancestor of the table containing the child select element (related either directly through the child table’s foreign keys or through other intermediary tables’ foreign keys).

When a parent element is linked to a child select element in another table, the user cannot change the value of the parent element once child rows have been created in the child table. When [parent element].isRequired is true, child rows cannot be created in the child table until a value has been selected in the parent element.

Notes

When [child select element].alowNew is true and a new item is created, the new item is stored in the select’s definition table and the link information is stored in its link table.

Select Field Keyboard Shortcuts

Key CombinationEffect
Ctrl + NAdd an item to the field (only if the field allows new items).
Not applicable in Google Chrome.
Ctrl + MAdd a list of items to the field (only if the field allows new items).

HTML Class Attribute

In display mode, the text of the select field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiSelectField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiSelectField dbiDrilldown dbiDisplay dbiTableOrderItem dbiFieldSal"

In edit mode, the select of the select field is an HTML select element. The HTML class attribute of the select is a set of six classes:

"dbiSelect dbiSelectField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiSelect dbiSelectField dbiDrilldown dbiEdit dbiTableOrderItem dbiFieldSal"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendTreeview

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3Definition Table InfoYesStringThe name of the Definition Table.If the Definition Table contains identity fields then an array with values for each identity field must be used.
Array of StringsThe first element of the array is the name of the Definition Table and the subsequent elements are the identity field values.
4Link Table InfoYesStringThe name of the Link Table.If the Link Table contains identity fields then an array with values for each identity field must be used.
Array of StringsThe first element of the array is the name of the Link Table and the subsequent elements are the identity field values.
LASTOptional PropertiesNoObjectInherited Properties
See Treeview Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The Treeview field displays as simple text and edits in a modal window. Clicking the button of the Treeview field edit GUI will pop up the Treeview modal window. Clicking on a closed folder in the treeview will open the folder; clicking an open folder will close it. Clicking on an item will select the item; clicking on a selected item or double-clicking an unselected item will edit the item description. While editing an item’s description, pressing the Enter key will save the changes; pressing the Esc key will exit the edit mode without saving the changes. As shown below, items can be dragged and dropped to a new position in the treeview. While dragging an item, pressing the Esc key will exit the drag operation without performing a drop. The Treeview modal window’s keyboard shortcuts are detailed in the table below. As shown below, right-clicking an item will display the context menu. The effect of selecting Add Children vs. Add Children… from the context menu is also shown below.

An Example of a Treeview Dialog

Treeview Dialog ExampleTreeview Dialog Example

Add Child vs. Add Children…

Treeview Dialog ExampleTreeview Dialog Example

Treeview Modal Window Keyboard Shortcuts

Key CombinationEffect
EscClose the Treeview modal window.
Up ArrowSelect the item immediately above the current item.
Down ArrowSelect the item immediately below the current item.
Left ArrowIf the selected item is an open folder, close it; otherwise select the item immediately above the selected item.
Right ArrowIf the selected item is a closed folder, open it; otherwise select the item immediately below the selected item.
F2Edit the item description.
F3
Ctrl + F
Search for an item amongst the descendants of the selected item.
Ctrl + NAdd a child to the selected item (only if the field allows new items).
Not applicable in Google Chrome.
Ctrl + MAdd a list of children to the selected item (only if the field allows new items).
Ctrl + CCopy the selected item.
Ctrl + XCut the selected branch.
Ctrl + VPaste the item or branch.
DeleteDelete the selected branch.

The Treeview shortcuts can be viewed in the application by clicking the image of the three keyboard keys in the bottom right corner of the Treeview window.

HTML Class Attribute

Display Mode

In display mode, the text of the treeview field is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiTreeviewField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiTreeviewField dbiDrilldown dbiDisplay dbiTablePatient dbiFieldDiagnosisid"

Edit Mode

The edit mode picklist field control consists of a clear image, a text element and a windowOpener button.

Clear Image

The clear image is an HTML div element. The HTML class attribute of the div is a set of seven classes:

"dbiImage dbiImageClear dbiTreeviewField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiImage dbiImageClear dbiTreeviewField dbiDrilldown dbiEdit dbiTablePatient dbiFieldDiagnosisid"

Text

The text is an HTML div element. The HTML class attribute of the div is a set of six classes:

"dbiText dbiTreeviewField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiTreeviewField dbiDrilldown dbiEdit dbiTablePatient dbiFieldDiagnosisid"

WindowOpener Button

The windowOpener button is an HTML button element. The HTML class attribute of the button is a set of seven classes:

"dbiButton dbiButtonWindowOpener dbiTreeviewField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiButtonWindowOpener dbiTreeviewField dbiDrilldown dbiEdit dbiTablePatient dbiFieldDiagnosisid"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendURL

ParameterRequired?Data TypeDescription / Notes
#Name
1Physical Field NameYesFNFDAThe name of the field in the database table.
Virtual Field NameStringThe name of the virtual field. A calculate data-driven function must be specified for the field.
2Field CaptionNoStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
LASTOptional PropertiesNoObjectInherited Properties
See URL Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

In display mode, the URL field provides an HTML anchor (link). In edit mode, the field control is a simple textbox with built-in warning-level validation of the entered URL.

HTML Class Attribute

In display mode, the text of the url field is an HTML a (anchor) element. The HTML class attribute of the anchor is a set of six classes:

"dbiAnchor dbiUrlField dbi[ Inline | Drilldown ] dbiDisplay dbiTable[ table name ] dbiField[ field name ]"
"dbiAnchor dbiUrlField dbiDrilldown dbiDisplay dbiTableInsmst dbiFieldWebsite"

In edit mode, the input of the url field is an HTML input element. The HTML class attribute of the input is a set of six classes:

"dbiInput dbiUrlField dbi[ Inline | Drilldown ] dbiEdit dbiTable[ table name ] dbiField[ field name ]"
"dbiInput dbiUrlField dbiDrilldown dbiEdit dbiTableInsmst dbiFieldWebsite"

Please see HTML Classes for more information on uses of the HTML class attribute.

.appendWebServiceRequest

ParameterRequired?Data TypeDescription / Notes
#Name
1Virtual Field NameYesStringThe name of the virtual field.
2Field CaptionYesStringThe caption to display for the field.
See Field Captions for a full discussion of this parameter.
Array of Strings
3URLYesStringThe URL of the web service (i.e. "http://www.mydomain.com/mywebservice.asmx").
If the URL does not begin with "http", it will be resolved to the local server.
LASTOptional PropertiesNoObjectInherited Properties
See WebServiceRequest Field Properties.
See Inline Field Properties.
See Drilldown Field Properties.

The WebServiceRequest field displays data retrieved from a web service. This field requires the use of two data-driven functions, calculateHttpData and processResponse.

The WebServiceRequest field requires two data-driven functions, calculateHttpData and processResponse.

HTML Class Attribute

The webServiceRequest field consists of a text element and a refresh button. The text element is and HTML div element and the refresh button is an HTML button element.

The HTML class attribute of the div is a set of six classes:

"dbiText dbiWebServiceRequestField dbi[ Inline | Drilldown ] dbi[ Display | Edit ] dbiTable[ table name ] dbiField[ field name ]"
"dbiText dbiWebServiceRequestField dbiInline dbiDisplay dbiTableClientStock dbiFieldStockPrice"

The refresh button is an HTML button element. The HTML class attribute of the div is a set of six classes:

"dbiButton dbiWebServiceRequestField dbi[ Inline | Drilldown ] dbi[ Display | Edit ] dbiTable[ table name ] dbiField[ field name ]"
"dbiButton dbiWebServiceRequestField dbiInline dbiDisplay dbiTableClientStock dbiFieldStockPrice"

Please see HTML Classes for more information on uses of the HTML class attribute.

Data-Driven (DD) Functions

Data-driven functions are optional functions which are named following precise naming conventions.

Nomenclature

Edit Group

An edit group consists of a parent table and all its S1 & S2 child tables. The edit group parent table is the first non- S1/S2 table in the relational tree. The tables of an edit group are always edited concurrently.

Field Values

The field values passed to the data-driven functions are the stored (database) values for display rows and the current (interface) values for edit rows. There are two important exceptions to this rule:

  1. The value of a Boolean field will either be a Boolean value or undefined. The dbiScript field value may differ from the stored field value as determined by the underlying (database) field type and the [boolean field element].values property. An undefined Boolean is equivalent to a database NULL.
  2. The value of a Money, Numeric or Percentage field in edit mode where the input text box is blank will be zero (0) if the field is required and undefined if it is not. A field is required if its database field does not allow nulls or if the field’s .isRequired property is true.

Table-Level DD Functions

Naming Convention: [data table name]_[function name]

Function Declaration
Data Table Name Does Not Contain a SpaceData Table Name Contains a Space
function [data table name]_[function name](){}window["[data table name]_[function name]"] = function (){}
Examples
function order_item_maxRows(){}window["order item_maxRows"] = function(){}

isDisplayed

Applies To: Edit GUI
ParameterData TypeDescription / Notes
#Name
1Field Values of All Edit Group TablesObjectAn object specifying the display or current values of each field of every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
BooleanSpecify whether or not the table is displayed.
Non-BooleanAny non-boolean value returned by the function is interpreted as False (i.e. the table will not be displayed).

The isDisplayed data-driven function only applies to S1 & S2 tables.

Any existing and undisplayed (hidden) S1/S2 rows are deleted when a row is saved.

If you have existing data in your application, ensure that it is in compliance with the table-level isDisplayed data-driven function. In other words, the data should be scrubbed to delete any existing S1/S2 rows that would be hidden following the code of your isDisplayed function. If these rows are not deleted, they will appear in display mode but disappear as soon as the edit group row is edited. If the edit group row is then saved, any hidden S1/S2 rows will be deleted.

maxRows

ParameterData TypeDescription / Notes
#Name
1Field Values of All Foreign TablesObjectAn object specifying the display or current values of each field of every foreign parent table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
IntegerThe maximum number of rows allowed in the table for the current foreign rows.

The maxRows data-driven function is only evaluated at the time when new rows are added to a table. It will prevent the saving of a parent row with more than <maxRows> child rows and it will prevent the addition of child rows to an existing parent row if the total number of child rows would exceed <maxRows>. If the value returned by maxRows is less than the number of rows that already exist, the child rows are not affected.

Special Return Values

Return ValueEffect
0No maximum number of rows.
undefinedNo maximum number of rows.
nullUse dataTable.maxRows. (Parameter #6 of app.gui.appendDataTable)

minRows

ParameterData TypeDescription / Notes
#Name
1Field Values of All Foreign TablesObjectAn object specifying the display or current values of each field of every foreign parent table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
IntegerThe minimum number of rows allowed in the table for the current foreign rows.

The minRows data-driven function is only evaluated at the time when a new parent row is added to a table. The parent row cannot be saved until <minRows> child rows have been created. If the value returned by minRows is greater than the number of child rows that exists for an existing parent row, the child rows are not affected.

Special Return Values

Return ValueEffect
0No minimum number of rows.
undefinedNo minimum number of rows.
nullUse dataTable.minRows. (Parameter #5 of app.gui.appendDataTable)

Row-Level DD Functions

Naming Convention: [data table name]_row_[function name]

Function Declaration
Data Table Name Does Not Contain a SpaceData Table Name Contains a Space
function [data table name]_row_[function name](){}window["[data table name]_row_[function name]"] = function (){}
Examples
function order_item_row_validateDelete(){}window["order item_row_validateDelete"] = function(){}

drilldownCaptionStyle

Applies To: Edit GUI
ParameterData TypeDescription / Notes
#Name
1Edit FlagBooleanfalse – row is in display mode, true – row is in edit mode
2Row TypeInteger0 – Even, 1 – Odd, 2 – Selected
3Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
4Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
ObjectHTML DOM styling

Note that if the data table has a .rows.drilldown.style.caption property specified, the property-specified style is applied first and then the data-driven function’s style is applied.

function patient_row_drilldownCaptionStyle(b,i,o,p) {
return { background: /a/.test(o.lname) ? "blue" : "" };
}

drilldownStyle

Applies To: Edit GUI
ParameterData TypeDescription / Notes
#Name
1Edit FlagBooleanfalse – row is in display mode, true – row is in edit mode
2Row TypeInteger0 – Even, 1 – Odd, 2 – Selected
3Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
4Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
ObjectHTML DOM styling

Note that if the data table has a .rows.drilldown.style property specified, the property-specified style is applied first and then the data-driven function’s style is applied.

validateDelete

Applies To: Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
3Count of Child Rows to DeleteIntegerSpecifies the number of child rows that will be deleted. Count does not include S1 or S2 tables.
4Count by Table of Child Rows to DeleteObjectAn object specifying the number of rows that will be deleted from each child table in the format
{"table name":count, … }
. S1 and S2 tables are included in the count.
Return Data TypeDescription / Notes
StringA descriptive error message to display.

If a non-empty string is returned from the data-driven validateDelete function, the row cannot be deleted and the error message is displayed.

function patient_row_validateDelete(o,i) {
return i ? "Patients with child rows cannot be deleted." : "";
}

Field-Level DD Functions

Naming Convention: [data table name]_[field name]_[function name]

Function Declaration
Data Table Name Does Not Contain a Space
and
Field Name Does Not Contain a Space
Data Table Name Contains a Space
or
Field Name Contains a Space
function [data table name]_[field name]_[function name](){}window["[data table name]_[field name]_[function name]"]= function (){}
Examples
function order_item_discount_validate(){}window["order item_discount_validate"] = function(){}

newValue

Applies To: Edit GUI
ParameterData TypeDescription / Notes
#Name
1Field Values of All Foreign TablesObjectAn object specifying the display or current values of each field of every foreign parent table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
Field Data TypeThe value of the field for a new row.

The newValue data-driven function has no effect with the following dbiScript fields:

  • Any field using a calculate data-driven function
  • Age
  • Aggregate
  • AggregateMoney
  • Button
  • CopyButton
  • MemoPreview
  • MoveButton
function trandtl_servfrdttm_newValue() { return new Date(); }

style

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Edit FlagBooleanfalse – row is in display mode, true – row is in edit mode
2Row TypeInteger0 – Even, 1 – Odd, 2 – Selected
3Field ValueFieldData Type The value of the field.
4Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
5Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
ObjectHTML DOM styling

Note that if the field has a .style property specified, the property-specified style is applied first and then the data-driven function’s style is applied.

function patient_lname_style(b,i,o,p) {
return { background: b && i==2 ? "blue" : "" };
}

updateValue

Applies To: Edit GUI
ParameterData TypeDescription / Notes
#Name
1Table NameStringThe name of the data table which contains the updated field.
2Field NameStringThe name of the field which was updated.
3Data-Driven Field’s Current ValueField Data TypeThe current value of the data-driven field. Note that the data-driven field is the field which is used to name the data-driven function.
4Updated Field’s Previous ValueFieldData Type The previous value of the updated field. Note that this is the previous value of the field which was updated (not the data-driven field).
5Updated Field’s Current ValueFieldData Type The current value of the updated field. Note that this is the current value of the field which was updated (not the data-driven field).
6Current Row ValuesObjectAn object specifying the current values of each field in the table in the format
{"field name":<field value>, … }
7Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
Field Data TypeThe updated value of the field.
undefinedSets the field value to undefined (equivalent to database NULL).
nullThe field value will not be changed (do nothing).

The updateValue data-driven function has no effect with the following dbiScript fields:

  • Any field using a calculate data-driven function
  • Age
  • Aggregate
  • AggregateMoney
  • Button
  • CopyButton
  • MemoPreview
  • MoveButton

Care must be taken with the value returned by the field-level updateValue data-driven function. Since the function is fired whenever a field value changes in any of the edit group tables, it is important to always check the first two parameters (data table and field name of the field which changed value) of the function. The null value (JavaScript null) must be returned for any case in which the field value should not be changed. Returning undefined (JavaScript undefined) will set the field value to undefined which is equivalent to database NULL.

The updateValue data-driven function is only called when the user changes a value through the dbiScript interface. Changing a value through an updateValue data-driven function does not initiate another round of updateValue data-driven function calls.

window["order item_unitPrice_updateValue"] = function (s,t,i,j,k,o,p) {
if(s=="order item" && t=="productid") return p.product.unitPrice * (1 - o.discount);
if(s=="order item" && t=="discount") return i / (1 - j) * (1 - k);
return null;
}

validate

Applies To: Edit GUI
ParameterData TypeDescription / Notes
#Name
1Current Field ValueFieldData Type The current value of the field.
2Original Field ValueFieldData Type The original value of the field before the row was edited.
3Current Row ValuesObjectAn object specifying the current values of each field in the table in the format
{"field name":<field value>, … }
4Original Row ValuesObjectAn object specifying the original values of each field in the table in the format
{"field name":<field value>, … }
5Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
StringA descriptive error message to display.

The validate data-driven function can be used with physical and calculated dbiScript fields. It has no effect with Button, CopyButton, MemoPreview, or MoveButton fields.

If a non-empty string is returned from the data-driven validate function, the row cannot be saved and the error message is displayed.

function tranprc_charge_validate(s,t,o) {
return s != o.chargeins + o.chargepat ? "Total charge must equal insurance charge + patient charge." : "";
}
An Error Message Spawned via a Validate Data-Driven Function
Error Message Example

verify

Applies To: Edit GUI
ParameterData TypeDescription / Notes
#Name
1Current Field ValueFieldData Type The current value of the field.
2Original Field ValueFieldData Type The original value of the field before the row was edited.
3Current Row ValuesObjectAn object specifying the current values of each field in the table in the format
{"field name":<field value>, … }
4Original Row ValuesObjectAn object specifying the original values of each field in the table in the format
{"field name":<field value>, … }
5Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
StringA descriptive warning message to display.

The verify data-driven function can be used with physical and calculated dbiScript fields. It has no effect with Button, CopyButton, MemoPreview, or MoveButton fields.

If a non-empty string is returned from the data-driven validate function, the warning message is displayed and the user must verify that the row is to be saved.

function tranprc_charge_verify(s) {
return s > 10000 ? "Charge exceeds $10,000." : "";
}
A Warning Message Spawned via a Verify Data-Driven Function
Warning Message Example

Field DD Functions (A - M)

Aggregate

parameters

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
ObjectAn object specifying the parameters for the field’s .where clause in the format
{"parameter name":"parameter value", … }

If the parameter data type is Date or DateTime then specify a JavaScript date for the parameter value. Use undefined or an empty string for a null Date / DateTime value. All other data types can be specified either with a JavaScript string value or with a corresponding JavaScript value.

AggregateMoney

parameters

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
ObjectAn object specifying the parameters for the field’s .where clause in the format
{"parameter name":"parameter value", … }

If the parameter data type is Date or DateTime then specify a JavaScript date for the parameter value. Use undefined or an empty string for a null Date / DateTime value. All other data types can be specified either with a JavaScript string value or with a corresponding JavaScript value.

AjaxButton

calculateHttpData

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
ObjectAn object of data to send to the server. The object will be converted to a string of name/value pairs when the data is submitted to the server.
function patient_printReport_calculateHttpData(o){
var a=[ "firstName", "lastName", "patientNo" ], i;
for(i=0;i<a.length;i++) if( !validateValue(o,a[i]) ) return null;
return {name: o.firstName + " " + o.lastName, patNo: o.patientNo};
}

function validateValue(o,s) {
var friendlyNames = {
firstName: "first name",
lastName: "last name",
patientNo: "patient number"
}
if(!o[s]) { // !o[s] will be true if o[s] is undefined or empty ("")
messagebox("The " + friendlyNames[s] + " is required.",16,"Validation Error");
return false;
}
return true;
}

processResponse

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Server DataString
Array
Object
The data returned by the server. This will be a string for fields of .type "string" and "xmlString". For fields of .type "csv" and "tsv", an array of arrays is returned in the format
[ [ A1 , B1 , C1 , … ] , [ A2 , B2 , C2 , … ] , … ]
For all other field types, the data will be an object.
2Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
3Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}

The following practical example illustrates how to examine the return data. This is useful if the format of the return data is unknown.

function patient_printReport_processResponse(o){ console.log(o); }

This will log the return data object to the browser’s JavaScript console.

The format of the data returned by the server should be considered volatile and handled appropriately. In the following practical example, the data returned by the server is expected to be an object with a specific format. The handling used in the data-driven function will ensure that the function does not generate an error if the format of the data received varies from the expected format.

function patient_printReport_processResponse(s){
messagebox("The server says: " + s,64);
}

Boolean

calculate

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
Boolean / undefinedThe value to display. The Boolean field can display three values, (NULL / undefined), (false), and (true). The blank button can be used to indicate false by setting the field’s .falseIsBlank property to true.

Button

onclick

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
n/an/a
function patient_button1_onclick(o) {
window.open(
http://maps.google.com/maps?q= +
(o.address1 + "+" + o.city + "+" + o.state).replace(/ /g,"+")
);
}

Data

calculate

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
Number / StringUse a calculate data-driven function with a Data field for numeric and string output. If the value returned by the function is a number, the field’s .decimals property controls the formatting of the displayed value. If a string is returned, no formatting will be applied. If any other data type is returned by the function, an empty string will be displayed.
When the Data field is tied to a physical field in the database, dbiScript will automatically differentiate between Boolean, Money, Number, and String data types. This is not possible with virtual fields. Use a dbiScript Boolean field for Boolean virtual data and a dbiScript Money field for currency-formatted virtual data.

Drilldown (Fields and Groups)

captionStyle

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Edit FlagBooleanfalse – row is in display mode, true – row is in edit mode
2Row TypeInteger0 – Even, 1 – Odd, 2 – Selected
3Field ValueFieldData Type The value of the field.
4Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
5Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
ObjectHTML DOM styling

Note that if the field has a .style property specified, the property-specified style is applied first and then the data-driven function’s style is applied.

function patient_dob_captionStyle(b,i,o,p) {
return { background: b && i==2 ? "blue" : "" };
}

isDisplayed

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Edit Group TablesObjectAn object specifying the display or current values of each field of every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
BooleanSpecify whether or not the field is displayed.
Non-BooleanAny non-boolean value returned by the function is interpreted as False (i.e. the field will not be displayed).

The naming convention for a drilldown group is [table name]_[group name]_isDisplayed.

The isDisplayed data-driven function is evaluated whenever the display or edit data change.

When a row is saved, an undisplayed field is never validated or verified and the value of any undisplayed fields is set to undefined. Note that a required field (.isRequired = true) which has an isDisplayed data-driven function will only require a field value to pass validation when the field is displayed.

function patient_lstmensdttm_isDisplayed(o) { return o.gender == "F"; }

Email

calculate

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
StringThe email address to display.

setBCC

Applies To: Display GUI
ParameterData TypeDescription / Notes
#Name
1Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
StringA semi-colon delimited list of email addresses.

setBody

Applies To: Display GUI
ParameterData TypeDescription / Notes
#Name
1Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
StringThe email body text.

setCC

Applies To: Display GUI
ParameterData TypeDescription / Notes
#Name
1Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
StringA semi-colon delimited list of email addresses.

setSubject

Applies To: Display GUI
ParameterData TypeDescription / Notes
#Name
1Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
StringThe email subject text.

Iconlist

calculate

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
Arrayof IntegersA list of icons (by index) to display.

appendIconlist Images Parameter: ["a.gif","b.gif","c.gif","d.gif"]

function patient_icons_calculate(o) {
var a = [ ], p = /a/i;
if( p.test(o.lname) ) a.push(0);
if( p.test(o.address1) ) a.push(1);
if( p.test(o.city) ) a.push(2);
if( p.test(o.state) ) a.push(3);
return a;
}

Inline Display Group

format

Applies To: Display GUI
ParameterData TypeDescription / Notes
#Name
1+Field ValueStringThe value of the field.
Return Data TypeDescription / Notes
StringThe formatted value to display.

The Inline Display Group field’s data-driven format function works identically to the Reference field data-driven format function.

Memo

setRows

Applies To: Edit GUI
ParameterData TypeDescription / Notes
#Name
1Field ValueStringThe value of the field.
2Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
3Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
IntegerThe number of rows in the textarea element.

Money

calculate

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
NumberThe value to display. The returned value is displayed as a currency formatted number (e.g. $100.00). The field’s .moneySymbol and .decimals properties control the formatting of the displayed value.
function orderitem_total_calculate(o){
return o.quantity * o.unitprice * (1 + System.taxrate);
}

Field DD Functions (P - W)

Percentage

calculate

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
NumberThe value to display. The returned value is displayed as a percentage formatted number (e.g. 10%). The field’s .decimals property controls the formatting of the displayed value. The value returned by the function must be the percentage as a decimal (i.e. return .01 to have 1% displayed).

Reference

format, format[N]

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1+Field ValueField’s Data TypeThe value of the field.
Return Data TypeDescription / Notes
StringThe formatted value to display.

See .appendReference for a discussion of the format data-driven function(s).

function format_name(s,t,u) {return u + "," + s + (t? " " + t + ".":"");}

var patient_attorneyid_format = format_name,
patient_rdrmstid_format0 = format_name,
patient_refpatientid_format = format_name,
patient_sdrmstid_format = format_name;

function patient_rdrmstid_format1(s,t,u) {return s + " " + (t?t + ".":"") + u;}

Explanation:

The format_name function is a reusable function that is assigned to variables that are surrogates for several Reference field data-driven functions. The rdrmstid field uses a series of two format functions to enable the user to search for rows in two formats.

String

setInputMaskIndex

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
IntegerThe index of the .inputMask array.

If the value returned by setInputMaskIndex is not an integer or is outside the bounds of the .inputMask array, the field value is not masked.

URL

calculate

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
StringThe URL to display.

formatURL

Applies To: Display GUI
ParameterData TypeDescription / Notes
#Name
1Field ValueStringThe value of the field.
2Row Display ValuesObjectAn object specifying the display values of each field in the table in the format
{"field name":<field value>, … }
3Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
StringA valid URL.

Webservicerequest

calculateHttpData

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
2Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
ObjectAn object of data to send to the server. The object will be converted to a string of name/value pairs when the data is submitted to the server.

The calculateHttpData function must return a JavaScript object in order for the Web Service request to proceed. This enables validations within the calculateHttpData function. An example of validations within the calculateHttpData can be found here. If an empty JavaScript object ( i.e. {} ) is returned, the field value is cleared and a request is not sent to the web service.

processResponse

Applies To: Display GUI & Edit GUI
ParameterData TypeDescription / Notes
#Name
1Server DataString
Array
Object
The data returned by the server. This will be a string for fields of .type "string" and "xmlString". For fields of .type "csv" and "tsv", an array of arrays is returned in the format
[ [ A1 , B1 , C1 , … ] , [ A2 , B2 , C2 , … ] , … ]
For all other field types, the data will be an object.
2Manual Request?BooleanThis parameter indicates whether the request was automatic (parameter value = false) or manual (parameter value = true). A manual request is initiated by the user clicking on the field’s refresh button.
3Row ValuesObjectAn object specifying the display or current values of each field in the table in the format
{"field name":<field value>, … }
4Field Values of All Foreign Tables and Edit Group TablesObjectAn object specifying the display or current values of each field of every foreign parent table and every edit group table in the format
{"table name":{"field name":<field value>, … }, …}
Return Data TypeDescription / Notes
StringThe field value to display.

The following practical example illustrates how to examine the return data. This is useful if the format of the return data is unknown.

function client_stockPrice_processResponse(o){ console.log(o); }

This will log the return data object to the browser’s JavaScript console.

The format of the data returned by the server should be considered volatile and handled appropriately. In the following practical example, the data returned by the server is expected to be an object with a specific format. The handling used in the data-driven function will ensure that the function does not generate an error if the format of the data received varies from the expected format.

function client_stockPrice_processResponse(o){
return
typeof o == "object" &&
o != null &&
"StockQuotes" in o &&
"Stock" in o.StockQuotes &&
"Last" in o.StockQuotes.Stock ?
"$"+parseFloat(o.StockQuotes.Stock.Last).toFixed(2) : "";
}