{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\{table:class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[ALIGNMENT]{span}{span:class=sWordList}[ANCHOR]{span}{span:class=sWordList}[CURSOR]{span}{span:class=sWordList}[DEFAULTS]{span}{span:class=sWordList}[DISPLAYTYPE]{span}{span:class=sWordList}[JOINTYPE]{span}{span:class=sWordList}[JSButton]{span}{span:class=sWordList}[JSComponent]{span}{span:class=sWordList}[JSField]{span}{span:class=sWordList}[JSForm]{span}{span:class=sWordList}[JSLabel]{span}{span:class=sWordList}[JSMedia]{span}{span:class=sWordList}[JSMethod]{span}{span:class=sWordList}[JSPart]{span}{span:class=sWordList}[JSPortal]{span}{span:class=sWordList}[JSRelation]{span}{span:class=sWordList}[JSRelationItem]{span}{span:class=sWordList}[JSStyle]{span}{span:class=sWordList}[JSTab]{span}{span:class=sWordList}[JSTabPanel]{span}{span:class=sWordList}[JSValueList]{span}{span:class=sWordList}[JSVariable]{span}{span:class=sWordList}[MEDIAOPTION]{span}{span:class=sWordList}[PARTS]{span}{span:class=sWordList}[PRINTSLIDING]{span}{span:class=sWordList}[SCROLLBAR]{span}{span:class=sWordList}[VALUELIST]{span}{span:class=sWordList}[VARIABLETYPE]{span}{span:class=sWordList}[VIEW]{span}{td}{tr}{table}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[JSComponent]{td}{td}[#cloneComponent]\(newName, component, newParentForm)
Makes an exact copy of the given component
Cache
index
true
refresh
100d
showRefresh
true
id
doc
title
Refresh page
showDate
true
retry
Enable
servoy sReturnTypes2100%height: 30px;2Return TypessWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKservoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClientservoy sSummary12%30%58%height: 30px;3Methods SummaryMakes an exact copy of the given component (JSComponent/JSField/JSLabel) and gives it a new name.Makes an exact copy of the given component (JSComponent/JSField/JSLabel), gives it a new name and optionally moves it to a new parent form.{td}{tr}{tbody}{tbody}{tr}{td}[JSForm]{td}{td}[#cloneForm]\(newName, jsForm)
Makes an exact copy of the given form and gives it the new name.{td}{tr}{tbody}{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]\(server, tablename)
Get an array of forms, that are all based on datasource/servername or tablename.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#getGlobalMethod]\(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}[JSVariable]{td}{td}[#getGlobalVariable]\(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}[JSMedia]{td}{td}[#getMedia]\(name)
Gets the specified media object; can be assigned to a button/label.{td}{tr}{tbody}{tbody}{tr}{td}[JSMedia]\[]{td}{td}[#getMediaList]\()
Gets the list of all media objects.{td}{tr}{tbody}{tbody}{tr}{td}[JSRelation]{td}{td}[#getRelation]\(name)
Gets an existing relation by the specified name and returns a JSRelation Object.{td}{tr}{tbody}{tbody}{tr}{td}[JSRelation]\[]{td}{td}[#getRelations]\(primary_server_name/primary_data_source, primary_table_name)
Gets an array of all relations; or an array of all global relations if the specified table is NULL.{td}{tr}{tbody}{tbody}{tr}{td}[JSStyle]{td}{td}[#getStyle]\(name)
Gets the style specified by the given name.{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, server_name|data_source, table_name, style, show_in_menu, width, height)
Creates a new JSForm Object.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#newGlobalMethod]\(code)
Creates a new global method with the specified code.{td}{tr}{tbody}{tbody}{tr}{td}[JSVariable]{td}{td}[#newGlobalVariable]\(name, type)
Creates a new global variable with the specified name and number type.{td}{tr}{tbody}{tbody}{tr}{td}[JSMedia]{td}{td}[#newMedia]\(name, bytes)
Creates a new media object that can be assigned to a label or a button.{td}{tr}{tbody}{tbody}{tr}{td}[JSRelation]{td}{td}[#newRelation]\(name, primary_server_name|primary_data_source, primary_table_name, foreign_server_name|foreign_data_source, foreign_table_name, join_type)
Creates a new JSRelation Object with a specified name; includes the primary datasource, optional table name, foreign datasource, optional foreign table name, and the type of join for the new relation.{td}{tr}{tbody}{tbody}{tr}{td}[JSStyle]{td}{td}[#newStyle]\(name, content)
Creates a new style with the given css content string under the given name.{td}{tr}{tbody}{tbody}{tr}{td}[JSValueList]{td}{td}[#newValueList]\(name, type)
Creates a new valuelist with the specified name and number type.{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}[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:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=700A9888-A4F5-4417-8858-79DA0CE28EC8}{tr:id=name}{td}h6.cloneComponent{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSComponent]{span}{span:id=iets|style=float: left; font-weight: bold;}cloneComponent{span}{span:id=iets|style=float: left;}\(newName, component, newParentForm){span}{td}{tr}{tr:id=des}{td}{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_des|text=|trigger=button}{sub-section}{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_des|trigger=none|class=sIndent}Makes an exact copy of the given component (JSComponent/JSField/JSLabel), gives , specified as a parameter.Makes an exact copy of the given form and gives it the new name.Create a bevel border string.Create an empty border string.Create an etched border string.Create a font string.Create a line border string.Create a matte border string.Create a page format string.Create a page format string.Create a page format string.Create a special matte border string.Create a special matte border string.Create a titled border string.Gets an array of all relations.Gets the specified data source node and returns information about the form (see JSDataSourceNode node).Gets the specified form object and returns information about the form (see JSForm node).Get an array of all forms.Get an array of forms, that are all based on datasource/servername.Get an array of forms, that are all based on datasource/servername and tablename.Gets an existing global method by the specified name.The list of all global methods.The list of all global methods.Gets an existing global variable by the specified name.Gets an array of all global variables.Gets an array of all global variables.Gets the specified media object; can be assigned to a button/label.Gets the list of all media objects.Retrieves an element by its uuid.Gets an existing relation by the specified name and returns a JSRelation Object.Gets an array of all relations; or an array of all global relations if the specified table is NULL.Gets an array of all relations; or an array of all global relations if the specified table is NULL.Gets an array of all scope names used.Gets the style specified by the given name.Gets an existing valuelist by the specified name and returns a JSValueList Object that can be assigned to a field.Gets an array of all valuelists for the currently active solution.Creates a new JSForm Object.Create a responsive form:Creates a new form with the given JSForm as its super form.Creates a new form with the given JSForm as its super form.Create a responsive form:Creates a new JSForm Object.Creates a new JSForm Object.Creates a new global method with the specified code in a scope.Creates a new global variable with the specified name and number type.Creates a new media object that can be assigned to a label or a button.Creates a new media object for things like a CSS or LESS file that can be set as the clients solution style.Creates a new JSRelation Object with a specified name; includes the primary datasource, foreign datasource and the type of join for the new relation.Creates a new style with the given css content string under the given name.Creates a new valuelist with the specified name and number type.Removes the specified form during the persistent connected client session.Removes the specified global method.Removes the specified global variable.Removes the media item specified by name.Removes the relation specified by name.Removes the specified style.Removes the specified valuelist.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.Get a JSMethod instance with arguments to be assigned to an event.functionservoy sDetail2100%height:30px2Methods DetailscloneComponentname
cloneComponent(newName, component)
dessIndent
Makes an exact copy of the given component (JSComponent/JSField/JSLabel) and gives it a new name.
prs
Parameters
sIndentnewNamethe new name of the cloned componentcomponentthe component to cloneret
Returns
sIndent the exact copy of the given componentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowcloneComponentname
cloneComponent(newName, component, newParentForm)
dessIndent
Makes an exact copy of the given component (JSComponent/JSField/JSLabel), gives it a new name and
optionally
moves it to a new parent form
.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_prs|trigger=none}newName -- the new name of the cloned component
component -- the component to clone
\[newParentForm\] -- the new parent form
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_ret|text=|trigger=button}{sub-section}{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_ret|trigger=none|class=sIndent}[JSComponent] -- the exact copy of the given component{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_see|text=|trigger=button}{sub-section}{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_see|text=|trigger=button}{sub-section}{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_sam|text=|trigger=button}{sub-section}{sub-section:700A9888-A4F5-4417-8858-79DA0CE28EC8_sam|class=sIndent|trigger=none}{code:language=javascript}
// get an existing field to clone.
var field = solutionModel.getForm("formWithField").getField("fieldName");
// get the target form for the copied/cloned field
var form = solutionModel.getForm("targetForm");
// make a clone/copy of the field and re parent it to the target form.
var clone = solutionModel.cloneComponent("clonedField",field,form);
// show it
forms["targetForm"].controller.show();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=5388EB7E-C7AA-463D-9FEF-463ECAE3E874}{tr:id=name}{td}h6.cloneForm{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSForm]{span}{span:id=iets|style=float: left; font-weight: bold;}cloneForm{span}{span:id=iets|style=float: left;}\(newName, jsForm){span}{td}{tr}{tr:id=des}{td}{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_des|text=|trigger=button}{sub-section}{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_des|trigger=none|class=sIndent}Makes an exact copy of the given form and gives it the new name.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_prs|trigger=none}newName -- the new name for the form clone
jsForm -- the form to be cloned
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_ret|text=|trigger=button}{sub-section}{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_ret|trigger=none|class=sIndent}[JSForm] -- a JSForm{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_see|text=|trigger=button}{sub-section}{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_see|text=|trigger=button}{sub-section}{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_sam|text=|trigger=button}{sub-section}{sub-section:5388EB7E-C7AA-463D-9FEF-463ECAE3E874_sam|class=sIndent|trigger=none}{code:language=javascript}
// get an existing form
var form = solutionModel.getForm("existingForm")
// make a clone/copy from it
var clone = solutionModel.cloneForm("clonedForm", form)
// add a new label to the clone
clone.newLabel("added label",50,50,80,20);
// show it
forms["clonedForm"].controller.show();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=BF5CB4BA-1F36-4FC1-B18A-AB66146439F6}{tr:id=name}{td}h6.getForm{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSForm]{span}{span:id=iets|style=float: left; font-weight: bold;}getForm{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_des|text=|trigger=button}{sub-section}{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_des|trigger=none|class=sIndent}Gets the specified form object and returns information about the form (see JSForm node).{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_prs|trigger=none}name -- the specified name of the form
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_ret|text=|trigger=button}{sub-section}{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_ret|trigger=none|class=sIndent}[JSForm] -- a JSForm{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_see|text=|trigger=button}{sub-section}{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_see|text=|trigger=button}{sub-section}{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_sam|text=|trigger=button}{sub-section}{sub-section:BF5CB4BA-1F36-4FC1-B18A-AB66146439F6_sam|class=sIndent|trigger=none}{code:language=javascript}
var myForm = solutionModel.getForm('existingFormName');
//get the style of the form (for all other properties see JSForm node)
var styleName = myForm.styleName;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=FE01FD37-0253-4B1D-B52F-57FDF62035B3}{tr:id=name}{td}h6.getForms{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSForm]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getForms{span}{span:id=iets|style=float: left;}\(server, tablename){span}{td}{tr}{tr:id=des}{td}{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_des|text=|trigger=button}{sub-section}{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_des|trigger=none|class=sIndent}Get an array of forms, that are all based on datasource/servername or tablename.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_prs|trigger=none}\[server\] -- the datasource or servername
\[tablename\] -- the tablename
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_ret|text=|trigger=button}{sub-section}{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_ret|trigger=none|class=sIndent}[JSForm]\[] -- an array of JSForm type elements{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_see|text=|trigger=button}{sub-section}{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_see|text=|trigger=button}{sub-section}{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_sam|text=|trigger=button}{sub-section}{sub-section:FE01FD37-0253-4B1D-B52F-57FDF62035B3_sam|class=sIndent|trigger=none}{code:language=javascript}
var forms = solutionModel.getForms(datasource)
for (var i in forms)
application.output(forms[i].name)
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=49815ACE-1DCC-4B34-A003-A3A4933957DF}{tr:id=name}{td}h6.getGlobalMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMethod]{span}{span:id=iets|style=float: left; font-weight: bold;}getGlobalMethod{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_des|text=|trigger=button}{sub-section}{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_des|trigger=none|class=sIndent}Gets an existing global method by the specified name.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_prs|trigger=none}name -- the name of the specified global method
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_ret|text=|trigger=button}{sub-section}{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_ret|trigger=none|class=sIndent}[JSMethod] -- a JSMethod{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_see|text=|trigger=button}{sub-section}{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_see|text=|trigger=button}{sub-section}{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_sam|text=|trigger=button}{sub-section}{sub-section:49815ACE-1DCC-4B34-A003-A3A4933957DF_sam|class=sIndent|trigger=none}{code:language=javascript}
var method = solutionModel.getGlobalMethod("nameOfGlobalMethod");
if (method != null) application.output(method.code);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=748B036A-34E8-4238-AE57-72E9BFD44C3C}{tr:id=name}{td}h6.getGlobalMethods{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMethod]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getGlobalMethods{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_des|text=|trigger=button}{sub-section}{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_des|trigger=none|class=sIndent}The list of all global methods.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_ret|text=|trigger=button}{sub-section}{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_ret|trigger=none|class=sIndent}[JSMethod]\[] -- an array of JSMethod type elements{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_see|text=|trigger=button}{sub-section}{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_see|text=|trigger=button}{sub-section}{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_sam|text=|trigger=button}{sub-section}{sub-section:748B036A-34E8-4238-AE57-72E9BFD44C3C_sam|class=sIndent|trigger=none}{code:language=javascript}
var methods = solutionModel.getGlobalMethods();
if (methods != null)
for (var x in methods)
application.output(methods[x].getName());
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=18E41C59-615D-4EBC-A113-4D532D67E87C}{tr:id=name}{td}h6.getGlobalVariable{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSVariable]{span}{span:id=iets|style=float: left; font-weight: bold;}getGlobalVariable{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_des|text=|trigger=button}{sub-section}{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_des|trigger=none|class=sIndent}Gets an existing global variable by the specified name.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_prs|trigger=none}name -- the specified name of the global variable
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_ret|text=|trigger=button}{sub-section}{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_ret|trigger=none|class=sIndent}[JSVariable] -- a JSVariable{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_see|text=|trigger=button}{sub-section}{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_see|text=|trigger=button}{sub-section}{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_sam|text=|trigger=button}{sub-section}{sub-section:18E41C59-615D-4EBC-A113-4D532D67E87C_sam|class=sIndent|trigger=none}{code:language=javascript}
var globalVariable = solutionModel.getGlobalVariable('globalVariableName');
application.output(globalVariable.name + " has the default value of " + globalVariable.defaultValue);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EDF96E11-1DCD-400C-ABCB-F31C8E828359}{tr:id=name}{td}h6.getGlobalVariables{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSVariable]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getGlobalVariables{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_des|text=|trigger=button}{sub-section}{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_des|trigger=none|class=sIndent}Gets an array of all global variables.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_ret|text=|trigger=button}{sub-section}{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_ret|trigger=none|class=sIndent}[JSVariable]\[] -- an array of JSVariable type elements{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_see|text=|trigger=button}{sub-section}{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_see|text=|trigger=button}{sub-section}{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_sam|text=|trigger=button}{sub-section}{sub-section:EDF96E11-1DCD-400C-ABCB-F31C8E828359_sam|class=sIndent|trigger=none}{code:language=javascript}
var globalVariables = solutionModel.getGlobalVariables();
for (var i in globalVariables)
application.output(globalVariables[i].name + " has the default value of " + globalVariables[i].defaultValue);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C}{tr:id=name}{td}h6.getMedia{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMedia]{span}{span:id=iets|style=float: left; font-weight: bold;}getMedia{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_des|text=|trigger=button}{sub-section}{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_des|trigger=none|class=sIndent}Gets the specified media object; can be assigned to a button/label.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_prs|trigger=none}name -- the specified name of the media object
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_ret|text=|trigger=button}{sub-section}{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_ret|trigger=none|class=sIndent}[JSMedia] -- a JSMedia element{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_see|text=|trigger=button}{sub-section}{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_see|text=|trigger=button}{sub-section}{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_sam|text=|trigger=button}{sub-section}{sub-section:0CEE9DD4-4D12-42B2-9DC8-C33D52EEDC2C_sam|class=sIndent|trigger=none}{code:language=javascript}
var myMedia = solutionModel.getMedia('button01.gif')
//now set the imageMedia property of your label or button
//myButton.imageMedia = myMedia
// OR
//myLabel.imageMedia = myMedia
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=2489033E-6D4F-463B-BF7A-EF1335D13187}{tr:id=name}{td}h6.getMediaList{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMedia]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getMediaList{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_des|text=|trigger=button}{sub-section}{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_des|trigger=none|class=sIndent}Gets the list of all media objects.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_ret|text=|trigger=button}{sub-section}{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_ret|trigger=none|class=sIndent}[JSMedia]\[] -- a list with all the media objects.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_see|text=|trigger=button}{sub-section}{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_see|text=|trigger=button}{sub-section}{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_sam|text=|trigger=button}{sub-section}{sub-section:2489033E-6D4F-463B-BF7A-EF1335D13187_sam|class=sIndent|trigger=none}{code:language=javascript}
var mediaList = solutionModel.getMediaList();
if (mediaList.length != 0 && mediaList != null) {
for (var x in mediaList) {
application.output(mediaList[x]);
}
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=B3CD3E99-623D-4AEF-9B30-90098BA3D319}{tr:id=name}{td}h6.getRelation{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRelation]{span}{span:id=iets|style=float: left; font-weight: bold;}getRelation{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_des|text=|trigger=button}{sub-section}{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_des|trigger=none|class=sIndent}Gets an existing relation by the specified name and returns a JSRelation Object.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_prs|trigger=none}name -- the specified name of the relation
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_ret|text=|trigger=button}{sub-section}{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_ret|trigger=none|class=sIndent}[JSRelation] -- a JSRelation{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_see|text=|trigger=button}{sub-section}{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_see|text=|trigger=button}{sub-section}{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_sam|text=|trigger=button}{sub-section}{sub-section:B3CD3E99-623D-4AEF-9B30-90098BA3D319_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.getRelation('name');
application.output("The primary server name is " + relation.primaryServerName);
application.output("The primary table name is " + relation.primaryTableName);
application.output("The foreign table name is " + relation.foreignTableName);
application.output("The relation items are " + relation.getRelationItems());
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=31E9D60D-9339-49E4-8818-25D36067BE69}{tr:id=name}{td}h6.getRelations{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRelation]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getRelations{span}{span:id=iets|style=float: left;}\(primary_server_name/primary_data_source, primary_table_name){span}{td}{tr}{tr:id=des}{td}{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_des|text=|trigger=button}{sub-section}{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_des|trigger=none|class=sIndent}Gets an array of all relations; or an array of all global relations if the specified table is NULL.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_prs|trigger=none}\[primary_server_name/primary_data_source\] -- the specified name of the server or datasource for the specified table
\[primary_table_name\] -- the specified name of the table
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_ret|text=|trigger=button}{sub-section}{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_ret|trigger=none|class=sIndent}[JSRelation]\[] -- an array of all relations (all elements in the array are of type JSRelation){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_see|text=|trigger=button}{sub-section}{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_see|text=|trigger=button}{sub-section}{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_sam|text=|trigger=button}{sub-section}{sub-section:31E9D60D-9339-49E4-8818-25D36067BE69_sam|class=sIndent|trigger=none}{code:language=javascript}
var relations = solutionModel.getRelations('server_name','table_name');
if (relations.length != 0)
for (var i in relations)
application.output(relations[i].name);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=33572037-4F2E-45A1-B779-D9C492912FBE}{tr:id=name}{td}h6.getStyle{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSStyle]{span}{span:id=iets|style=float: left; font-weight: bold;}getStyle{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_des|text=|trigger=button}{sub-section}{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_des|trigger=none|class=sIndent}Gets the style specified by the given name.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_prs|trigger=none}name -- the specified name of the style
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_ret|text=|trigger=button}{sub-section}{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_ret|trigger=none|class=sIndent}[JSStyle] -- a JSStyle{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_see|text=|trigger=button}{sub-section}{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_see|text=|trigger=button}{sub-section}{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_sam|text=|trigger=button}{sub-section}{sub-section:33572037-4F2E-45A1-B779-D9C492912FBE_sam|class=sIndent|trigger=none}{code:language=javascript}
var style = solutionModel.getStyle('my_existing_style')
style.content = 'combobox { color: #0000ff;font: italic 10pt "Verdana";}'
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=BA31C3FC-87BF-4A3E-8950-15FEC20E0A96}{tr:id=name}{td}h6.getValueList{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSValueList]{span}{span:id=iets|style=float: left; font-weight: bold;}getValueList{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_des|text=|trigger=button}{sub-section}{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_des|trigger=none|class=sIndent}Gets an existing valuelist by the specified name and returns a JSValueList Object that can be assigned to a field.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_prs|trigger=none}name -- the specified name of the valuelist
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_ret|text=|trigger=button}{sub-section}{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_ret|trigger=none|class=sIndent}[JSValueList] -- a JSValueList object{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_see|text=|trigger=button}{sub-section}{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_see|text=|trigger=button}{sub-section}{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_sam|text=|trigger=button}{sub-section}{sub-section:BA31C3FC-87BF-4A3E-8950-15FEC20E0A96_sam|class=sIndent|trigger=none}{code:language=javascript}
var myValueList = solutionModel.getValueList('myValueListHere')
//now set the valueList property of your field
//myField.valuelist = myValueList
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=53E3E23F-8278-4DBB-94DA-403E4941625C}{tr:id=name}{td}h6.getValueLists{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSValueList]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getValueLists{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_des|text=|trigger=button}{sub-section}{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_des|trigger=none|class=sIndent}Gets an array of all valuelists for the currently active solution.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_ret|text=|trigger=button}{sub-section}{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_ret|trigger=none|class=sIndent}[JSValueList]\[] -- an array of JSValueList objects{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_see|text=|trigger=button}{sub-section}{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_see|text=|trigger=button}{sub-section}{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_sam|text=|trigger=button}{sub-section}{sub-section:53E3E23F-8278-4DBB-94DA-403E4941625C_sam|class=sIndent|trigger=none}{code:language=javascript}
var valueLists = solutionModel.getValueLists();
if (valueLists != null && valueLists.length != 0)
for (var i in valueLists)
application.output(valueLists[i].name);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=33EF8553-0775-41CF-9FDD-66897FC3ACE9}{tr:id=name}{td}h6.newForm{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSForm]{span}{span:id=iets|style=float: left; font-weight: bold;}newForm{span}{span:id=iets|style=float: left;}\(name, server_name|data_source, table_name, style, show_in_menu, width, height){span}{td}{tr}{tr:id=des}{td}{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_des|text=|trigger=button}{sub-section}{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_des|trigger=none|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.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_prs|trigger=none}name -- the specified name of the form
server_name|data_source -- the specified name of the server or datasource for the specified table
\[table_name\] -- the specified name of the table
style -- the specified style
show_in_menu -- if true show the name of the new form in the menu; or false for not showing
width -- the width of the form in pixels
height -- the height of the form in pixels
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_ret|text=|trigger=button}{sub-section}{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_ret|trigger=none|class=sIndent}[JSForm] -- a new JSForm object{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_see|text=|trigger=button}{sub-section}{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_see|text=|trigger=button}{sub-section}{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_sam|text=|trigger=button}{sub-section}{sub-section:33EF8553-0775-41CF-9FDD-66897FC3ACE9_sam|class=sIndent|trigger=none}{code:language=javascript}
var myForm = solutionModel.newForm('newForm', 'myServer', 'myTable', '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}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=9C3E31CC-BABE-41F0-9CA5-E67AE9854811}{tr:id=name}{td}h6.newGlobalMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMethod]{span}{span:id=iets|style=float: left; font-weight: bold;}newGlobalMethod{span}{span:id=iets|style=float: left;}\(code){span}{td}{tr}{tr:id=des}{td}{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_des|text=|trigger=button}{sub-section}{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_des|trigger=none|class=sIndent}Creates a new global method with the specified code.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_prs|trigger=none}code -- the specified code for the global method
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_ret|text=|trigger=button}{sub-section}{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_ret|trigger=none|class=sIndent}[JSMethod] -- a JSMethod object{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_see|text=|trigger=button}{sub-section}{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_see|text=|trigger=button}{sub-section}{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_sam|text=|trigger=button}{sub-section}{sub-section:9C3E31CC-BABE-41F0-9CA5-E67AE9854811_sam|class=sIndent|trigger=none}{code:language=javascript}
var method = solutionModel.newGlobalMethod('function myglobalmethod(){currentcontroller.newRecord()}')
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=D7AC5E95-EA94-4CDF-A733-ECD1E5C44555}{tr:id=name}{td}h6.newGlobalVariable{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSVariable]{span}{span:id=iets|style=float: left; font-weight: bold;}newGlobalVariable{span}{span:id=iets|style=float: left;}\(name, type){span}{td}{tr}{tr:id=des}{td}{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_des|text=|trigger=button}{sub-section}{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_des|trigger=none|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.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_prs|trigger=none}name -- the specified name for the global variable
type -- the specified number type for the global variable
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_ret|text=|trigger=button}{sub-section}{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_ret|trigger=none|class=sIndent}[JSVariable] -- a JSVariable object{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_see|text=|trigger=button}{sub-section}{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_see|text=|trigger=button}{sub-section}{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_sam|text=|trigger=button}{sub-section}{sub-section:D7AC5E95-EA94-4CDF-A733-ECD1E5C44555_sam|class=sIndent|trigger=none}{code:language=javascript}
var myGlobalVariable = solutionModel.newGlobalVariable('newGlobalVariable',JSVariable.INTEGER);
myGlobalVariable.defaultValue = 12;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A2966C5A-D1A4-4C3D-A349-E836473ABCE9}{tr:id=name}{td}h6.newMedia{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMedia]{span}{span:id=iets|style=float: left; font-weight: bold;}newMedia{span}{span:id=iets|style=float: left;}\(name, bytes){span}{td}{tr}{tr:id=des}{td}{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_des|text=|trigger=button}{sub-section}{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_des|trigger=none|class=sIndent}Creates a new media object that can be assigned to a label or a button.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_prs|trigger=none}name -- The name of the new media
bytes -- The content
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_ret|text=|trigger=button}{sub-section}{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_ret|trigger=none|class=sIndent}[JSMedia] -- a JSMedia object{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_see|text=|trigger=button}{sub-section}{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_see|text=|trigger=button}{sub-section}{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_sam|text=|trigger=button}{sub-section}{sub-section:A2966C5A-D1A4-4C3D-A349-E836473ABCE9_sam|class=sIndent|trigger=none}{code:language=javascript}
var myMedia = solutionModel.newMedia('button01.gif',bytes)
//now set the imageMedia property of your label or button
//myButton.imageMedia = myMedia
// OR
//myLabel.imageMedia = myMedia
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=26039BD4-DCB9-414A-8C9F-C999C80FEBB2}{tr:id=name}{td}h6.newRelation{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRelation]{span}{span:id=iets|style=float: left; font-weight: bold;}newRelation{span}{span:id=iets|style=float: left;}\(name, primary_server_name|primary_data_source, primary_table_name, foreign_server_name|foreign_data_source, foreign_table_name, join_type){span}{td}{tr}{tr:id=des}{td}{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_des|text=|trigger=button}{sub-section}{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_des|trigger=none|class=sIndent}Creates a new JSRelation Object with a specified name; includes the primary datasource, optional table name, foreign datasource, optional foreign table name, and the type of join for the new relation.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_prs|trigger=none}name -- the specified name of the new relation
primary_server_name|primary_data_source -- the specified name of the primary server or datasource
\[primary_table_name\] -- the specified name of the primary table
foreign_server_name|foreign_data_source -- the specified name of the foreign server or datasource
\[foreign_table_name\] -- the specified name of the foreign table
join_type -- the type of join for the new relation; JSRelation.INNER_JOIN, JSRelation.LEFT_OUTER_JOIN
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_ret|text=|trigger=button}{sub-section}{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_ret|trigger=none|class=sIndent}[JSRelation] -- a JSRelation object{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_see|text=|trigger=button}{sub-section}{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_see|text=|trigger=button}{sub-section}{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_sam|text=|trigger=button}{sub-section}{sub-section:26039BD4-DCB9-414A-8C9F-C999C80FEBB2_sam|class=sIndent|trigger=none}{code:language=javascript}
var rel = solutionModel.newRelation('myRelation','myPrimaryServerName','myPrimaryTableName','myForeignServerName','myForeignTableName',JSRelation.INNER_JOIN);
application.output(rel.getRelationItems());
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AE60638D-F726-445C-B44E-29B4FCE4D35B}{tr:id=name}{td}h6.newStyle{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSStyle]{span}{span:id=iets|style=float: left; font-weight: bold;}newStyle{span}{span:id=iets|style=float: left;}\(name, content){span}{td}{tr}{tr:id=des}{td}{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_des|text=|trigger=button}{sub-section}{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_des|trigger=none|class=sIndent}Creates a new style with the given css content string under the given name.
NOTE: Will throw an exception if a style with that name already exists.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_prs|trigger=none}name -- the name of the new style
content -- the css content of the new style
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_ret|text=|trigger=button}{sub-section}{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_ret|trigger=none|class=sIndent}[JSStyle] -- a JSStyle object{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_see|text=|trigger=button}{sub-section}{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_see|text=|trigger=button}{sub-section}{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_sam|text=|trigger=button}{sub-section}{sub-section:AE60638D-F726-445C-B44E-29B4FCE4D35B_sam|class=sIndent|trigger=none}{code:language=javascript}
var form = solutionModel.newForm('myForm','myServer','myTable',null,true,1000,800);
if (form.transparent == false)
{
var style = solutionModel.newStyle('myStyle','form { background-color: yellow; }');
style.text = style.text + 'field { background-color: blue; }';
form.styleName = 'myStyle';
}
var field = form.newField('columnTextDataProvider',JSField.TEXT_FIELD,100,100,100,50);
forms['myForm'].controller.show();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4C392159-FB0A-430A-8E57-CF815F461AA2}{tr:id=name}{td}h6.newValueList{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSValueList]{span}{span:id=iets|style=float: left; font-weight: bold;}newValueList{span}{span:id=iets|style=float: left;}\(name, type){span}{td}{tr}{tr:id=des}{td}{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_des|text=|trigger=button}{sub-section}{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_des|trigger=none|class=sIndent}Creates a new valuelist with the specified name and number type.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_prs|trigger=none}name -- the specified name for the valuelist
type -- the specified number type for the valuelist; may be JSValueList.CUSTOM_VALUES, JSValueList.DATABASE_VALUES, JSValueList.EMPTY_VALUE_ALWAYS, JSValueList.EMPTY_VALUE_NEVER
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_ret|text=|trigger=button}{sub-section}{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_ret|trigger=none|class=sIndent}[JSValueList] -- a JSValueList object{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_see|text=|trigger=button}{sub-section}{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_see|text=|trigger=button}{sub-section}{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_sam|text=|trigger=button}{sub-section}{sub-section:4C392159-FB0A-430A-8E57-CF815F461AA2_sam|class=sIndent|trigger=none}{code:language=javascript}
var vl1 = solutionModel.newValueList("customText",JSValueList.CUSTOM_VALUES);
vl1.customValues = "customvalue1\ncustomvalue2";
var vl2 = solutionModel.newValueList("customid",JSValueList.CUSTOM_VALUES);
vl2.customValues = "customvalue1|1\ncustomvalue2|2";
var form = solutionModel.newForm("customValueListForm",controller.getDataSource(),null,true,300,300);
var combo1 = form.newComboBox("globals.text",10,10,120,20);
combo1.valuelist = vl1;
var combo2 = form.newComboBox("globals.id",10,60,120,20);
combo2.valuelist = vl2;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7}{tr:id=name}{td}h6.removeForm{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}removeForm{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_des|text=|trigger=button}{sub-section}{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_des|trigger=none|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).{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_prs|trigger=none}name -- the specified name of the form to remove
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_ret|text=|trigger=button}{sub-section}{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_ret|trigger=none|class=sIndent}[Boolean] -- true is form has been removed, false if form could not be removed{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_see|text=|trigger=button}{sub-section}{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_see|text=|trigger=button}{sub-section}{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_sam|text=|trigger=button}{sub-section}{sub-section:B60E8FBD-AAF3-4425-90DD-C95BAF5EB6C7_sam|class=sIndent|trigger=none}{code:language=javascript}
//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}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=101918EF-2F90-43BA-A050-CA609D7200C4}{tr:id=name}{td}h6.revertForm{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSForm]{span}{span:id=iets|style=float: left; font-weight: bold;}revertForm{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_des|text=|trigger=button}{sub-section}{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_des|trigger=none|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).{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_prs|trigger=none}name -- the specified name of the form to revert
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_ret|text=|trigger=button}{sub-section}{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_ret|trigger=none|class=sIndent}[JSForm] -- a JSForm object{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_see|text=|trigger=button}{sub-section}{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_see|text=|trigger=button}{sub-section}{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_sam|text=|trigger=button}{sub-section}{sub-section:101918EF-2F90-43BA-A050-CA609D7200C4_sam|class=sIndent|trigger=none}{code:language=javascript}
//first remove it from the current history, to destroy any active form instance
var success = history.removeForm('myForm')
if(success)
{
//reverts the named form to the original solution design form, will throw an exception if the form is not an original, please make sure you called history.remove() first
var revertedForm = solutionModel.revertForm('myForm')
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
, specified as a parameter.
prs
Parameters
sIndentnewNamethe new name of the cloned componentcomponentthe component to clonenewParentFormthe new parent formret
Returns
sIndent the exact copy of the given componentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowcloneFormname
cloneForm(newName, jsForm)
dessIndent
Makes an exact copy of the given form and gives it the new name.
prs
Parameters
sIndentnewNamethe new name for the form clonejsFormthe form to be clonedret
sIndenttop_widthtop width of empty border in pixelsright_widthright width of empty border in pixelsbottom_widthbottom width of empty border in pixelsleft_widthleft width of empty border in pixelsret
sIndenttop_widthtop width of matte border in pixelsright_widthright width of matte border in pixelsbottom_widthbottom width of matte border in pixelsleft_widthleft width of matte border in pixelscolorborder colorret
Create a page format string.
Note: The unit specified for width, height and all margins MUST be the same.
prs
Parameters
sIndentwidththe specified width of the page to be printed.heightthe specified height of the page to be printed.leftmarginthe specified left margin of the page to be printed.rightmarginthe specified right margin of the page to be printed.topmarginthe specified top margin of the page to be printed.bottommarginthe specified bottom margin of the page to be printed.ret
Create a page format string.
Note: The unit specified for width, height and all margins MUST be the same.
prs
Parameters
sIndentwidththe specified width of the page to be printed.heightthe specified height of the page to be printed.leftmarginthe specified left margin of the page to be printed.rightmarginthe specified right margin of the page to be printed.topmarginthe specified top margin of the page to be printed.bottommarginthe specified bottom margin of the page to be printed.orientationthe specified orientation of the page to be printed; the default is Portrait moderet
Create a page format string.
Note: The unit specified for width, height and all margins MUST be the same.
prs
Parameters
sIndentwidththe specified width of the page to be printed.heightthe specified height of the page to be printed.leftmarginthe specified left margin of the page to be printed.rightmarginthe specified right margin of the page to be printed.topmarginthe specified top margin of the page to be printed.bottommarginthe specified bottom margin of the page to be printed.orientationthe specified orientation of the page to be printed; the default is Portrait modeunitsthe specified units for the width and height of the page to be printed; the default is pixelsret
sIndenttop_widthtop width of matte border in pixelsright_widthright width of matte border in pixelsbottom_widthbottom width of matte border in pixelsleft_widthleft width of matte border in pixelstop_colortop border colorright_colorright border colorbottom_colorbottom border colorleft_colorleft border colorrounding_radiusarray with width/height of the arc to round the cornersborder_stylethe border styles for the four margins(top/left/bottom/left)ret
sIndenttop_widthtop width of matte border in pixelsright_widthright width of matte border in pixelsbottom_widthbottom width of matte border in pixelsleft_widthleft width of matte border in pixelstop_colortop border colorright_colorright border colorbottom_colorbottom border colorleft_colorleft border colorrounding_radiuswidth of the arc to round the cornersdash_patternthe dash pattern of border strokeret
sIndenttitle_textthe text from borderfonttitle text font stringcolorborder colortitle_justificationtitle text justificationtitle_positionbevel title text positionret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgetAllRelationsname
getAllRelations()
dessIndent
Gets an array of all relations.
ret
Returns
sIndent an array of all relations (all elements in the array are of type JSRelation)clients
Gets the specified data source node and returns information about the form (see JSDataSourceNode node).
The JSDataSourceNode holds all calculations and foundset methods.
prs
Parameters
sIndentdataSourcetable data sourceret
Returns
sIndent a JSDataSourceNodeclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgetFormname
getForm(name)
dessIndent
Gets the specified form object and returns information about the form (see JSForm node).
Gets an existing valuelist by the specified name and returns a JSValueList Object that can be assigned to a field.
NOTE: Changes to valuelist should be done before showing any form that has component using the valuelist.
Gets an array of all valuelists for the currently active solution.
NOTE: Changes to valuelist should be done before showing any form that has component using the valuelist.
sIndentnameThe name of the new form, must be a valid javascript identifierisResponsiveif true will create an responsive form, otherwise an absolute layout formret
Returns
sIndent a new JSForm objectclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRownewFormname
newForm(name, superForm)
dessIndent
Creates a new form with the given JSForm as its super form.
prs
Parameters
sIndentnameThe name of the new formsuperFormthe super form that will extended from, see JSform.setExtendsForm();ret
Returns
sIndent a new JSForm objectclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRownewFormname
newForm(name, superForm, isResponsive)
dessIndent
Creates a new form with the given JSForm as its super form.
Use this function in the case when the super form is a logical form (no parts/UI).
prs
Parameters
sIndentnameThe name of the new form, must be a valid javascript identifiersuperFormthe super form that will extended from, see JSform.setExtendsForm();isResponsive ;ret
Returns
sIndent a new JSForm objectclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRownewFormname
newForm(name, dataSource, isResponsive)
dessIndent
Create a responsive form:
prs
Parameters
sIndentnameThe name of the new form, must be a valid javascript identifierdataSourcethe form datasourceisResponsiveif true will create an responsive form, otherwise an absolute layout formret
Creates a new JSForm Object.
NOTE: See the JSForm node for more information about form objects that can be added to the new form.
prs
Parameters
sIndentnamethe specified name of the form, must be a valid javascript identifierdataSourcethe specified name of the datasource for the specified tablestyleNamethe specified styleshow_in_menuif true show the name of the new form in the menu; or false for not showingwidththe width of the form in pixelsheightthe height of the form in pixelsret
Creates a new JSForm Object.
NOTE: See the JSForm node for more information about form objects that can be added to the new form.
prs
Parameters
sIndentnamethe specified name of the formserverNamethe specified name of the server for the specified tabletableNamethe specified name of the tablestyleNamethe specified styleshow_in_menuif true show the name of the new form in the menu; or false for not showingwidththe width of the form in pixelsheightthe height of the form in pixelsret
Returns
sIndent a new JSForm objectclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRownewGlobalMethodname
newGlobalMethod(scopeName, code)
dessIndent
Creates a new global method with the specified code in a scope.
prs
Parameters
sIndentscopeNamethe scope in which the method is createdcodethe specified code for the global methodret
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.
prs
Parameters
sIndentscopeNamethe scope in which the variable is creatednamethe specified name for the global variabletypethe specified number type for the global variableret
Creates a new media object that can be assigned to a label or a button.
prs
Parameters
sIndentnameThe name of the new mediabytesThe contentret
Returns
sIndent a JSMedia objectclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRownewMedianame
newMedia(name, bytes)
dessIndent
Creates a new media object for things like a CSS or LESS file that can be set as the clients solution style.
The stringContents is converted to bytes through the UTF-8 charset.
prs
Parameters
sIndentnameThe name of the new mediabytesThe contentret
Creates a new JSRelation Object with a specified name; includes the primary datasource, foreign datasource and the type of join for the new relation.
prs
Parameters
sIndentnamethe specified name of the new relationprimaryDataSourcethe specified name of the primary datasourceforeignDataSourcethe specified name of the foreign datasourcejoinTypethe type of join for the new relation; JSRelation.INNER_JOIN, JSRelation.LEFT_OUTER_JOINret
Returns
sIndent a JSRelation objectclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRownewStylename
newStyle(name, content)
dessIndent
Creates a new style with the given css content string under the given name.
NOTE: Will throw an exception if a style with that name already exists.
prs
Parameters
sIndentnamethe name of the new stylecontentthe css content of the new styleret
Returns
sIndent a JSStyle objectclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRownewValueListname
newValueList(name, type)
dessIndent
Creates a new valuelist with the specified name and number type.
prs
Parameters
sIndentnamethe specified name for the valuelisttypethe specified number type for the valuelist; may be JSValueList.CUSTOM_VALUES, JSValueList.DATABASE_VALUES, JSValueList.EMPTY_VALUE_ALWAYS, JSValueList.EMPTY_VALUE_NEVERret
Removes the specified form during the persistent connected client session.
NOTE: Make sure you call history.remove first in your Servoy method (script).
prs
Parameters
sIndentnamethe specified name of the form to removeret
Returns
sIndent true is form has been removed, false if form could not be removedclients
sIndentnamethe name of the media item to be removedret
Returns
sIndent true if the removal was successful, false otherwiseclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowremoveRelationname
removeRelation(name)
dessIndent
Removes the relation specified by name. You cannot remove the relation if it is touched within the application.
So even if you remove all the ui elements using it, like tabs, it still can't be removed, because of underlying created and cached data.
prs
Parameters
sIndentnamethe name of the relation to be removedret
Returns
sIndent true if the removal was successful, false otherwiseclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowremoveStylename
removeStyle(name)
dessIndent
Removes the specified style.
prs
Parameters
sIndentnamethe name of the style to be removedret
Returns
sIndent true if the removal was successful, false otherwiseclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowremoveValueListname
removeValueList(name)
dessIndent
Removes the specified valuelist.
prs
Parameters
sIndentnamename of the valuelist to be removedret
Returns
sIndent true if the removal was successful, false otherwiseclients
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.
prs
Parameters
sIndentnamethe specified name of the form to revertret