Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
{div:style=}
Wiki Markup
Div
styledisplay:none

DO

NOT

EDIT

THE

CONTENT

OF

THIS

PAGE

DIRECTLY

(EXCEPT

INSIDE

THE

DIV

BELOW

WITH

ID=DESCRIPTION),

UNLESS

YOU

KNOW

WHAT

YOU'RE

DOING.


THE

STRUCTURE

OF

THE

CONTENT

IS

VITAL

IN

BEING

ABLE

TO

AUTO

UPDATE

THE

CONTENT

THROUGH

THE

DOC

GENERATOR.

\\ \\ Enter additional information related to this



Enter additional information related to this 'class'

inside

the

\

{div}

macro

with

'id=description'

{div} {div:id=description}{div}\\ {table:id=|class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[DEFAULTS]{span}{span:class=sWordList}[JSBean]{span}{span:class=sWordList}[JSButton]{span}{span:class=sWordList}[JSCalendar]{span}{span:class=sWordList}[JSChecks]{span}{span:class=sWordList}[JSCombobox]{span}{span:class=sWordList}[JSComponent]{span}{span:class=sWordList}[JSField]{span}{span:class=sWordList}[JSFooter]{span}{span:class=sWordList}[JSForm]{span}{span:class=sWordList}[JSHeader]{span}{span:class=sWordList}[JSInsetList]{span}{span:class=sWordList}[JSLabel]{span}{span:class=sWordList}[JSList]{span}{span:class=sWordList}[JSMethod]{span}{span:class=sWordList}[JSPassword]{span}{span:class=sWordList}[JSRadios]{span}{span:class=sWordList}[JSText]{span}{span:class=sWordList}[JSTextArea]{span}{span:class=sWordList}[JSTitle]{span}{span:class=sWordList}[JSValueList]{span}{span:class=sWordList}[JSVariable]{span}{td}{tr}{table}\\ {table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[JSForm]{td}{td}[#getForm]\(name) Gets the specified form object and returns information about the form (see JSForm node).{td}{tr}{tbody}{tbody}{tr}{td}[JSForm]\[]{td}{td}[#getForms]\() Get an array of all forms.{td}{tr}{tbody}{tbody}{tr}{td}[JSForm]\[]{td}{td}[#getForms]\(datasource) Get an array of forms, that are all based on datasource/servername.{td}{tr}{tbody}{tbody}{tr}{td}[JSForm]\[]{td}{td}[#getForms]\(server, tablename) Get an array of forms, that are all based on datasource/servername and tablename.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#getGlobalMethod]\(scopeName, name) Gets an existing global method by the specified name.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]\[]{td}{td}[#getGlobalMethods]\() The list of all global methods.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]\[]{td}{td}[#getGlobalMethods]\(scopeName) The list of all global methods.{td}{tr}{tbody}{tbody}{tr}{td}[JSVariable]{td}{td}[#getGlobalVariable]\(scopeName, name) Gets an existing global variable by the specified name.{td}{tr}{tbody}{tbody}{tr}{td}[JSVariable]\[]{td}{td}[#getGlobalVariables]\() Gets an array of all global variables.{td}{tr}{tbody}{tbody}{tr}{td}[JSVariable]\[]{td}{td}[#getGlobalVariables]\(scopeName) Gets an array of all global variables.{td}{tr}{tbody}{tbody}{tr}{td}[JSList]{td}{td}[#getListForm]\(formName) Returns an existing list form.{td}{tr}{tbody}{tbody}{tr}{td}[JSList]\[]{td}{td}[#getListForms]\() Get an array of all list\-forms.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getScopeNames]\() Gets an array of all scope names used.{td}{tr}{tbody}{tbody}{tr}{td}[JSValueList]{td}{td}[#getValueList]\(name) Gets an existing valuelist by the specified name and returns a JSValueList Object that can be assigned to a field.{td}{tr}{tbody}{tbody}{tr}{td}[JSValueList]\[]{td}{td}[#getValueLists]\() Gets an array of all valuelists for the currently active solution.{td}{tr}{tbody}{tbody}{tr}{td}[JSForm]{td}{td}[#newForm]\(name, dataSource) Creates a new JSForm Object.{td}{tr}{tbody}{tbody}{tr}{td}[JSForm]{td}{td}[#newForm]\(name, dataSource, styleName, show_in_menu, width, height) Creates a new JSForm Object.{td}{tr}{tbody}{tbody}{tr}{td}[JSForm]{td}{td}[#newForm]\(name, serverName, tableName, styleName, show_in_menu, width, height) Creates a new JSForm Object.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#newGlobalMethod]\(scopeName, code) Creates a new global method with the specified code in a scope.{td}{tr}{tbody}{tbody}{tr}{td}[JSVariable]{td}{td}[#newGlobalVariable]\(scopeName, name, type) Creates a new global variable with the specified name and number type.{td}{tr}{tbody}{tbody}{tr}{td}[JSList]{td}{td}[#newListForm]\(formName, dataSource, textDataProviderID) Creates a new list form, similar to an inset list but without the inset list's header and relation.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeForm]\(name) Removes the specified form during the persistent connected client session.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeGlobalMethod]\(scopeName, name) Removes the specified global method.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeGlobalVariable]\(scopeName, name) Removes the specified global variable.{td}{tr}{tbody}{tbody}{tr}{td}[JSForm]{td}{td}[#revertForm]\(name) Reverts the specified form to the original (blueprint) version of the form; will result in an exception error if the form is not an original form.{td}{tr}{tbody}{table}\\ {table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getForm-String}{tr:id=name}{td}h6.getForm{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSForm]{span}{span:style=font-weight: bold;}getForm{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets the specified form object and returns information about the form (see JSForm node).{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the form {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSForm] -- a JSForm{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}

Div
iddescription


HTML Table
id
classservoy sReturnTypes
Table Row (tr)
styleheight: 30px;
Table Head (th)
Return Types
Table Row (tr)
Table Cell (td)
Span
classsWordList
DEFAULTS
Span
classsWordList
JSBean
Span
classsWordList
JSButton
Span
classsWordList
JSCalendar
Span
classsWordList
JSChecks
Span
classsWordList
JSCombobox
Span
classsWordList
JSComponent
Span
classsWordList
JSField
Span
classsWordList
JSFooter
Span
classsWordList
JSForm
Span
classsWordList
JSHeader
Span
classsWordList
JSInsetList
Span
classsWordList
JSLabel
Span
classsWordList
JSList
Span
classsWordList
JSMethod
Span
classsWordList
JSPassword
Span
classsWordList
JSRadios
Span
classsWordList
JSText
Span
classsWordList
JSTextArea
Span
classsWordList
JSTitle
Span
classsWordList
JSValueList
Span
classsWordList
JSVariable

HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm
Table Cell (td)
#getForm(name)
Gets the specified form object and returns information about the form (see JSForm node).
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm[]
Table Cell (td)
#getForms()
Get an array of all forms.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm[]
Table Cell (td)
#getForms(datasource)
Get an array of forms, that are all based on datasource/servername.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm[]
Table Cell (td)
#getForms(server, tablename)
Get an array of forms, that are all based on datasource/servername and tablename.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMethod
Table Cell (td)
#getGlobalMethod(scopeName, name)
Gets an existing global method by the specified name.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMethod[]
Table Cell (td)
#getGlobalMethods()
The list of all global methods.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMethod[]
Table Cell (td)
#getGlobalMethods(scopeName)
The list of all global methods.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSVariable
Table Cell (td)
#getGlobalVariable(scopeName, name)
Gets an existing global variable by the specified name.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSVariable[]
Table Cell (td)
#getGlobalVariables()
Gets an array of all global variables.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSVariable[]
Table Cell (td)
#getGlobalVariables(scopeName)
Gets an array of all global variables.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSList
Table Cell (td)
#getListForm(formName)
Returns an existing list form.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSList[]
Table Cell (td)
#getListForms()
Get an array of all list-forms.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String[]
Table Cell (td)
#getScopeNames()
Gets an array of all scope names used.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSValueList
Table Cell (td)
#getValueList(name)
Gets an existing valuelist by the specified name and returns a JSValueList Object that can be assigned to a field.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSValueList[]
Table Cell (td)
#getValueLists()
Gets an array of all valuelists for the currently active solution.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm
Table Cell (td)
#newForm(name, dataSource)
Creates a new JSForm Object.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm
Table Cell (td)
#newForm(name, dataSource, styleName, show_in_menu, width, height)
Creates a new JSForm Object.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm
Table Cell (td)
#newForm(name, serverName, tableName, styleName, show_in_menu, width, height)
Creates a new JSForm Object.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMethod
Table Cell (td)
#newGlobalMethod(scopeName, code)
Creates a new global method with the specified code in a scope.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSVariable
Table Cell (td)
#newGlobalVariable(scopeName, name, type)
Creates a new global variable with the specified name and number type.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSList
Table Cell (td)
#newListForm(formName, dataSource, textDataProviderID)
Creates a new list form, similar to an inset list but without the inset list's header and relation.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeForm(name)
Removes the specified form during the persistent connected client session.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeGlobalMethod(scopeName, name)
Removes the specified global method.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeGlobalVariable(scopeName, name)
Removes the specified global variable.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm
Table Cell (td)
#revertForm(name)
Reverts the specified form to the original (blueprint) version of the form; will result in an exception error if the form is not an original form.

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idgetForm-String
Table Row (tr)
idname
Table Cell (td)
getForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSForm
Span
stylefont-weight: bold;
getForm
Span
(name)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets the specified form object and returns information about the form (see JSForm node).
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name – the specified name of the form
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSForm – a JSForm
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var myForm = solutionModel.getForm('existingFormName');
//get the style of the form (for all other properties see JSForm node)
var styleName = myForm.styleName;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getForms}{tr:id=name}{td}h6.getForms{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSForm]\[]{span}{span:style=font-weight: bold;}getForms{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Get an array of all forms.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSForm]\[] -- an array of JSForm type elements{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetForms
Table Row (tr)
idname
Table Cell (td)
getForms
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSForm[]
Span
stylefont-weight: bold;
getForms
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get an array of all forms.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSForm[] – an array of JSForm type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var forms = solutionModel.getForms()
for (var i in forms)
	application.output(forms[i].name)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getForms-String}{tr:id=name}{td}h6.getForms{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSForm]\[]{span}{span:style=font-weight: bold;}getForms{span}{span}\(datasource){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Get an array of forms, that are all based on datasource/servername.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} datasource -- the datasource or servername {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSForm]\[] -- an array of JSForm type elements{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetForms-String
Table Row (tr)
idname
Table Cell (td)
getForms
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSForm[]
Span
stylefont-weight: bold;
getForms
Span
(datasource)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get an array of forms, that are all based on datasource/servername.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} datasource – the datasource or servername
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSForm[] – an array of JSForm type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var forms = solutionModel.getForms(datasource)
for (var i in forms)
	application.output(forms[i].name)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetForms-String_String
}{
Table Row (tr)
:
id
=
name
}{td}h6.getForms{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
getForms
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}[
JSForm
]\
[]
{span}{span:style=
Span
stylefont-weight:
bold;
}
getForms
{span}{span}\
Span
(server,
tablename)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Get an array of forms, that are all based on datasource/servername and tablename.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} server -- the datasource or servername \{[String]} tablename -- the tablename {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSForm]\[] -- an array of JSForm type elements{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get an array of forms, that are all based on datasource/servername and tablename.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} server – the datasource or servername
{String} tablename – the tablename
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSForm[] – an array of JSForm type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var forms = solutionModel.getForms(datasource,tablename)
for (var i in forms)
	application.output(forms[i].
name) {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
name)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetGlobalMethod-String_String
}{
Table Row (tr)
:
id
=
name
}{td}h6.getGlobalMethod{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
getGlobalMethod
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}[
JSMethod
]{span}{span:style=
Span
stylefont-weight:
bold;
}
getGlobalMethod
{span}{span}\
Span
(scopeName,
name)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets an existing global method by the specified name.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} scopeName -- the scope in which the method is searched \{[String]} name -- the name of the specified global method {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod] -- a JSMethod{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets an existing global method by the specified name.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} scopeName – the scope in which the method is searched
{String} name – the name of the specified global method
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSMethod – a JSMethod
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var method = solutionModel.getGlobalMethod('globals', 'nameOfGlobalMethod'); 
if (method != null) application.output(method.code);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getGlobalMethods}{tr:id=name}{td}h6.getGlobalMethods{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSMethod]\[]{span}{span:style=font-weight: bold;}getGlobalMethods{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}The list of all global methods.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod]\[] -- an array of JSMethod type elements{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetGlobalMethods
Table Row (tr)
idname
Table Cell (td)
getGlobalMethods
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSMethod[]
Span
stylefont-weight: bold;
getGlobalMethods
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The list of all global methods.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSMethod[] – an array of JSMethod type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var methods = solutionModel.getGlobalMethods('globals'); 
for (var x in methods) 
	application.output(methods[x].getName())
; {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getGlobalMethods-String}{tr:id=name}{td}h6.getGlobalMethods{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSMethod]\[]{span}{span:style=font-weight: bold;}getGlobalMethods{span}{span}\(scopeName){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}The list of all global methods.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} scopeName -- limit to global methods of specified scope name {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod]\[] -- an array of JSMethod type elements{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetGlobalMethods-String
Table Row (tr)
idname
Table Cell (td)
getGlobalMethods
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSMethod[]
Span
stylefont-weight: bold;
getGlobalMethods
Span
(scopeName)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The list of all global methods.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} scopeName – limit to global methods of specified scope name
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSMethod[] – an array of JSMethod type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var methods = solutionModel.getGlobalMethods('globals'); 
for (var x in methods) 
	application.output(methods[x].getName());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetGlobalVariable-String_String
}{
Table Row (tr)
:
id
=
name
}{td}h6.getGlobalVariable{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
getGlobalVariable
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}[
JSVariable
]{span}{span:style=
Span
stylefont-weight:
bold;
}
getGlobalVariable
{span}{span}\
Span
(scopeName,
name)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets an existing global variable by the specified name.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} scopeName -- the scope in which the variable is searched \{[String]} name -- the specified name of the global variable {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSVariable] -- a JSVariable{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets an existing global variable by the specified name.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} scopeName – the scope in which the variable is searched
{String} name – the specified name of the global variable
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSVariable – a JSVariable
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var globalVariable = solutionModel.getGlobalVariable('globals', 'globalVariableName');
application.output(globalVariable.name + " has the default value of " + globalVariable.defaultValue);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getGlobalVariables}{tr:id=name}{td}h6.getGlobalVariables{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSVariable]\[]{span}{span:style=font-weight: bold;}getGlobalVariables{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets an array of all global variables.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSVariable]\[] -- an array of JSVariable type elements{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetGlobalVariables
Table Row (tr)
idname
Table Cell (td)
getGlobalVariables
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSVariable[]
Span
stylefont-weight: bold;
getGlobalVariables
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets an array of all global variables.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSVariable[] – an array of JSVariable type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var globalVariables = solutionModel.getGlobalVariables('globals');
for (var i in globalVariables)
	application.output(globalVariables[i].name + " has the default value of " + globalVariables[i].defaultValue);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getGlobalVariables-String}{tr:id=name}{td}h6.getGlobalVariables{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSVariable]\[]{span}{span:style=font-weight: bold;}getGlobalVariables{span}{span}\(scopeName){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets an array of all global variables.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} scopeName -- limit to global vars of specified scope name {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSVariable]\[] -- an array of JSVariable type elements{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetGlobalVariables-String
Table Row (tr)
idname
Table Cell (td)
getGlobalVariables
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSVariable[]
Span
stylefont-weight: bold;
getGlobalVariables
Span
(scopeName)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets an array of all global variables.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} scopeName – limit to global vars of specified scope name
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSVariable[] – an array of JSVariable type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var globalVariables = solutionModel.getGlobalVariables('globals');
for (var i in globalVariables)
	application.output(globalVariables[i].name + " has the default value of " + globalVariables[i].defaultValue);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getListForm-}{tr:id=name}{td}h6.getListForm{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSList]{span}{span:style=font-weight: bold;}getListForm{span}{span}\(formName){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns an existing list form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}formName -- the form's name. {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSList] -- the existing list form, or null if it does not exist.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetListForm-
Table Row (tr)
idname
Table Cell (td)
getListForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSList
Span
stylefont-weight: bold;
getListForm
Span
(formName)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an existing list form.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
formName – the form's name.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSList – the existing list form, or null if it does not exist.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var list = solutionModel.getListForm('created_by_sm_2'
); {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getListForms}{tr:id=name}{td}h6.getListForms{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSList]\[]{span}{span:style=font-weight: bold;}getListForms{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Get an array of all list\-forms.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSList]\[] -- an array of IBaseSHList type elements{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetListForms
Table Row (tr)
idname
Table Cell (td)
getListForms
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSList[]
Span
stylefont-weight: bold;
getListForms
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get an array of all list-forms.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSList[] – an array of IBaseSHList type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var forms = solutionModel.getListForms()
for (var i in forms)
	application.output(forms[i].name)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getScopeNames}{tr:id=name}{td}h6.getScopeNames{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]\[]{span}{span:style=font-weight: bold;}getScopeNames{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets an array of all scope names used.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]\[] -- an array of String scope names{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetScopeNames
Table Row (tr)
idname
Table Cell (td)
getScopeNames
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String[]
Span
stylefont-weight: bold;
getScopeNames
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets an array of all scope names used.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String[] – an array of String scope names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var scopeNames = solutionModel.getScopeNames();
for (var name in scopeNames)
	application.output(name);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getValueList-String}{tr:id=name}{td}h6.getValueList{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSValueList]{span}{span:style=font-weight: bold;}getValueList{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets an existing valuelist by the specified name and returns a JSValueList Object that can be assigned to a field.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the valuelist {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSValueList] -- a JSValueList object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetValueList-String
Table Row (tr)
idname
Table Cell (td)
getValueList
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSValueList
Span
stylefont-weight: bold;
getValueList
Span
(name)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets an existing valuelist by the specified name and returns a JSValueList Object that can be assigned to a field.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name – the specified name of the valuelist
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSValueList – a JSValueList object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var myValueList = solutionModel.getValueList('myValueListHere')
//now set the valueList property of your field
//myField.valuelist = myValueList
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getValueLists}{tr:id=name}{td}h6.getValueLists{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSValueList]\[]{span}{span:style=font-weight: bold;}getValueLists{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets an array of all valuelists for the currently active solution.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSValueList]\[] -- an array of JSValueList objects{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetValueLists
Table Row (tr)
idname
Table Cell (td)
getValueLists
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSValueList[]
Span
stylefont-weight: bold;
getValueLists
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets an array of all valuelists for the currently active solution.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSValueList[] – an array of JSValueList objects
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var valueLists = solutionModel.getValueLists();
if (valueLists != null && valueLists.length != 0)
	for (var i in valueLists)
		application.output(valueLists[i].name);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewForm-String_String
}{
Table Row (tr)
:
id
=
name
}{td}h6.newForm{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
newForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}[JSForm]{span}{span:style=
JSForm
Span
stylefont-weight:
bold;
}
newForm
{span}{span}\
Span
(name,
dataSource)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSForm Object. NOTE: See the JSForm node for more information about form objects that can be added to the new form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the form \{[String]} dataSource -- the specified name of the datasource for the specified table {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSForm] -- a new JSForm object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

Creates a new JSForm Object.

NOTE: See the JSForm node for more information about form objects that can be added to the new form.

Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name – the specified name of the form
{String} dataSource – the specified name of the datasource for the specified table
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSForm – a new JSForm object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var myForm = solutionModel.newForm('newForm', 'db:/my_server/my_table')
//now you can add stuff to the form (under JSForm node)
//add a label
myForm.newLabel('Name', 1)
//add a "normal" text entry field
myForm.newTextField('dataProviderNameHere', 2)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewForm-String_String_String_Boolean_Number_Number
}{
Table Row (tr)
:
id
=
name
}{td}h6.newForm{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
newForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}[
JSForm
]{span}{span:style=
Span
stylefont-weight:
bold;
}
newForm
{span}{span}\
Span
(name,
dataSource,
styleName,
show_in_menu,
width,
height)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSForm Object. NOTE: See the JSForm node for more information about form objects that can be added to the new form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the form \{[String]} dataSource -- the specified name of the datasource for the specified table \{[String]} styleName -- the specified style \{[Boolean]} show_in_menu -- if true show the name of the new form in the menu; or false for not showing \{[Number]} width -- the width of the form in pixels \{[Number]} height -- the height of the form in pixels {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSForm] -- a new JSForm object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

Creates a new JSForm Object.

NOTE: See the JSForm node for more information about form objects that can be added to the new form.

Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name – the specified name of the form
{String} dataSource – the specified name of the datasource for the specified table
{String} styleName – the specified style
{Boolean} show_in_menu – if true show the name of the new form in the menu; or false for not showing
{Number} width – the width of the form in pixels
{Number} height – the height of the form in pixels
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSForm – a new JSForm object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var myForm = solutionModel.newForm('newForm', 'db:/my_server/my_table', 'myStyleName', false, 800, 600)
//now you can add stuff to the form (under JSForm node)
//add a label
myForm.newLabel('Name', 20, 20, 120, 30)
//add a "normal" text entry field
myForm.newTextField('dataProviderNameHere', 140, 20, 140,20)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewForm-String_String_String_String_Boolean_Number_Number
}{
Table Row (tr)
:
id
=
name
}{td}h6.newForm{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
newForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}[
JSForm
]{span}{span:style=
Span
stylefont-weight:
bold;
}
newForm
{span}{span}\
Span
(name,
serverName,
tableName,
styleName,
show_in_menu,
width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSForm Object. NOTE: See the JSForm node for more information about form objects that can be added to the new form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the form \{[String]} serverName -- the specified name of the server for the specified table \{[String]} tableName -- the specified name of the table \{[String]} styleName -- the specified style \{[Boolean]} show_in_menu -- if true show the name of the new form in the menu; or false for not showing \{[Number]} width -- the width of the form in pixels \{[Number]} height -- the height of the form in pixels {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSForm] -- a new JSForm object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
width, height)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

Creates a new JSForm Object.

NOTE: See the JSForm node for more information about form objects that can be added to the new form.

Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name – the specified name of the form
{String} serverName – the specified name of the server for the specified table
{String} tableName – the specified name of the table
{String} styleName – the specified style
{Boolean} show_in_menu – if true show the name of the new form in the menu; or false for not showing
{Number} width – the width of the form in pixels
{Number} height – the height of the form in pixels
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSForm – a new JSForm object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var myForm = solutionModel.newForm('newForm', 'my_server', 'my_table', 'myStyleName', false, 800, 600)
//With only a datasource:
//var myForm = solutionModel.newForm('newForm', datasource, 'myStyleName', false, 800, 600)
//now you can add stuff to the form (under JSForm node)
//add a label
myForm.newLabel('Name', 20, 20, 120, 30)
//add a "normal" text entry field
myForm.newTextField('dataProviderNameHere', 140, 20, 140,20)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewGlobalMethod-String_String
}{
Table Row (tr)
:
id
=
name
}{td}h6.newGlobalMethod{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
newGlobalMethod
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}[
JSMethod
]{span}{span:style=
Span
stylefont-weight:
bold;
}
newGlobalMethod
{span}{span}\
Span
(scopeName,
code)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new global method with the specified code in a scope.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} scopeName -- the scope in which the method is created \{[String]} code -- the specified code for the global method {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod] -- a JSMethod object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Creates a new global method with the specified code in a scope.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} scopeName – the scope in which the method is created
{String} code – the specified code for the global method
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSMethod – a JSMethod object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var method = solutionModel.newGlobalMethod('globals', 'function myglobalmethod(){foundset.newRecord()}')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewGlobalVariable-String_String_Number
}{
Table Row (tr)
:
id
=
name
}{td}h6.newGlobalVariable{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
newGlobalVariable
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}[
JSVariable
]{span}{span:style=
Span
stylefont-weight:
bold;
}
newGlobalVariable
{span}{span}\
Span
(scopeName,
name,
type)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new global variable with the specified name and number type. NOTE: The global variable number type is based on the value assigned from the SolutionModel\-JSVariable node; for example: JSVariable.INTEGER.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} scopeName -- the scope in which the variable is created \{[String]} name -- the specified name for the global variable \{[Number]} type -- the specified number type for the global variable {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSVariable] -- a JSVariable object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

Creates a new global variable with the specified name and number type.

NOTE: The global variable number type is based on the value assigned from the SolutionModel-JSVariable node; for example: JSVariable.INTEGER.

Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} scopeName – the scope in which the variable is created
{String} name – the specified name for the global variable
{Number} type – the specified number type for the global variable
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSVariable – a JSVariable object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var myGlobalVariable = solutionModel.newGlobalVariable('globals', 'newGlobalVariable', JSVariable.INTEGER); 
myGlobalVariable.defaultValue = 12;
//myGlobalVariable.defaultValue = "{a:'First letter',b:'Second letter'}" // an js object, type must be media.
//myGlobalVariable.defaultValue = '"some text"'; // Use two pairs of quotes if you want to assign a String as default value.
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewListForm-String_String_String
}{
Table Row (tr)
:
id
=
name
}{td}h6.newListForm{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
newListForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}[
JSList
]{span}{span:style=
Span
stylefont-weight:
bold;
}
newListForm
{span}{span}\
Span
(formName,
dataSource,
textDataProviderID)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new list form, similar to an inset list but without the inset list's header and relation. The result will be an independent form which behaves like a mobile list.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} formName -- the new form's name. \{[String]} dataSource -- the list will be populated based on this datasource. \{[String]} textDataProviderID -- can be null; it's a convenience argument for setting the dataprovider that will be used to populate the main text area of the list's items. {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSList] -- the newly created list form.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Creates a new list form, similar to an inset list but without the inset list's header and relation.
The result will be an independent form which behaves like a mobile list.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} formName – the new form's name.
{String} dataSource – the list will be populated based on this datasource.
{String} textDataProviderID – can be null; it's a convenience argument for setting the dataprovider that will be used to populate the main text area of the list's items.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSList – the newly created list form.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var f = solutionModel.newForm("created_by_sm_1","udm","contacts",null,false,100,380);
// create a button to go to it on the main form
b = f.newButton("Show created list form",0,9,10,10,
	f.newMethod("function showListForm() { forms.created_by_sm_2.controller.show(); }"));
// create the actual list form
var list = f.createListForm('created_by_sm_2', databaseManager.getDataSource("udm","contacts"),"name_first");
list.onAction = solutionModel.getForm('created_by_sm_2').newMethod("function goBack() { history.back(); }");
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeForm-String}{tr:id=name}{td}h6.removeForm{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeForm{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes the specified form during the persistent connected client session. NOTE: Make sure you call history.remove first in your Servoy method (script).{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the form to remove {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true is form has been removed, false if form could not be removed{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveForm-String
Table Row (tr)
idname
Table Cell (td)
removeForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
removeForm
Span
(name)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

Removes the specified form during the persistent connected client session.

NOTE: Make sure you call history.remove first in your Servoy method (script).

Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name – the specified name of the form to remove
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean – true is form has been removed, false if form could not be removed
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

//first remove it from the current history, to destroy any active form instance
var success = history.removeForm('myForm')
//removes the named form from this session, please make sure you called history.remove() first
if(success)
{
	solutionModel.removeForm('myForm')
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveGlobalMethod-String_String
}{
Table Row (tr)
:
id
=
name
}{td}h6.removeGlobalMethod{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
removeGlobalMethod
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}[
Boolean
]{span}{span:style=
Span
stylefont-weight:
bold;
}removeGlobalMethod{span}{span}\
removeGlobalMethod
Span
(scopeName,
name)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes the specified global method.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} scopeName -- the scope in which the method is declared \{[String]} name -- the name of the global method to be removed {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if the removal was successful, false otherwise{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Removes the specified global method.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} scopeName – the scope in which the method is declared
{String} name – the name of the global method to be removed
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean – true if the removal was successful, false otherwise
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var m1 = solutionModel.newGlobalMethod('globals', 'function myglobalmethod1(){application.output("Global Method 1");}');
var m2 = solutionModel.newGlobalMethod('globals', 'function myglobalmethod2(){application.output("Global Method 2");}');

var success = solutionModel.removeGlobalMethod('globals', 'myglobalmethod1');
if (success == false) application.output('!!! myglobalmethod1 could not be removed !!!');

var list = solutionModel.getGlobalMethods('globals');
for (var i = 0; i < list.length; i++) { 
	application.output(list[i].code);
} {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveGlobalVariable-String_String
}{
Table Row (tr)
:
id
=
name
}{td}h6.removeGlobalVariable{td}{tr}{tr:id=sig}{td}{span:style=
Table Cell (td)
removeGlobalVariable
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right:
5px;
}[
Boolean
]{span}{span:style=
Span
stylefont-weight:
bold;
}
removeGlobalVariable
{span}{span}\
Span
(scopeName,
name)
{span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes the specified global variable.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} scopeName -- the scope in which the variable is declared \{[String]} name -- the name of the global variable to be removed {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if the removal was successful, false otherwise{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Removes the specified global variable.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} scopeName – the scope in which the variable is declared
{String} name – the name of the global variable to be removed
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean – true if the removal was successful, false otherwise
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var v1 = solutionModel.newGlobalVariable('globals', 'globalVar1', JSVariable.INTEGER);
var v2 = solutionModel.newGlobalVariable('globals', 'globalVar2', JSVariable.TEXT);

var success = solutionModel.removeGlobalVariable('globals', 'globalVar1');
if (success == false) application.output('!!! globalVar1 could not be removed !!!');

var list = solutionModel.getGlobalVariables('globals');
for (var i = 0; i < list.length; i++) {
	application.output(list[i].name + '[ ' + list[i].variableType + ']: ' + list[i].variableType);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=revertForm-String}{tr:id=name}{td}h6.revertForm{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSForm]{span}{span:style=font-weight: bold;}revertForm{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Reverts the specified form to the original (blueprint) version of the form; will result in an exception error if the form is not an original form. NOTE: Make sure you call history.remove first in your Servoy method (script) or call
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idrevertForm-String
Table Row (tr)
idname
Table Cell (td)
revertForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSForm
Span
stylefont-weight: bold;
revertForm
Span
(name)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

Reverts the specified form to the original (blueprint) version of the form; will result in an exception error if the form is not an original form.

NOTE: Make sure you call history.remove first in your Servoy method (script) or call form.controller.recreateUI()

before

the

script

ends.

{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the form to revert {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSForm] -- a JSForm object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}

Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name – the specified name of the form to revert
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSForm – a JSForm object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

// revert the form to the original solution form, removing any changes done to it through the solution model.
var revertedForm = solutionModel.revertForm('myForm')
// add a label on a random place.
revertedForm.newLabel("MyLabel",Math.random()*100,Math.random()*100,80,20);
// make sure that the ui is up to date.
forms.myForm.controller.recreateUI();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
Table Row (tr)
classlastDetailRow
Table Cell (td)