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 moves it to a new parent form, 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 moves it to a new parent form, 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