Child pages
  • JSCalculation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
{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:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#code] {td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#variableType] {td}{tr}{tbody}{table}\\ {table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#getName]\() This method returns the name of the stored calculation.{td}{tr}{tbody}{tbody}{tr}{td}[UUID]{td}{td}[#getUUID]\() Returns the UUID of the calculation.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isStored]\() Returns whether this calculation is a stored one or not.{td}{tr}{tbody}{table}\\ {table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=code|class=node}{tr:id=name}{td}h6.code{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:code_des|text=|trigger=button}{sub-section}{sub-section:code_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:code_snc|text=|trigger=button}{sub-section}{sub-section:code_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:code_prs|text=|trigger=button}{sub-section}{sub-section:code_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:code_ret|text=|trigger=button}{sub-section}{sub-section:code_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:code_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:code_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:code_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:code_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:code_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:code_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=variableType|class=node}{tr:id=name}{td}h6.variableType{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:variableType_des|text=|trigger=button}{sub-section}{sub-section:variableType_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:variableType_snc|text=|trigger=button}{sub-section}{sub-section:variableType_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:variableType_prs|text=|trigger=button}{sub-section}{sub-section:variableType_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:variableType_ret|text=|trigger=button}{sub-section}{sub-section:variableType_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:variableType_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:variableType_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:variableType_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:variableType_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:variableType_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:variableType_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ {table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getName|class=node}{tr:id=name}{td}h6.getName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getName_des|text=|trigger=button}{sub-section}{sub-section:getName_des|trigger=none|class=sIndent}
Wiki Markup
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Property SummaryThe full source code of this method (including doc and function declaration).Get or set the sql type of this variable.

servoy sSummary12%30%58%height: 30px;3Methods SummaryThis method returns the name of the stored calculation.Returns the UUID of the calculation.Check a flag of the calculation.Returns whether this calculation is a stored one or not.

propertyservoy sDetail2100%height:30px2Property Detailscodename

code

dessIndent
The full source code of this method (including doc and function declaration).
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowvariableTypename

variableType

dessIndent
Get or set the sql type of this variable.
Type should be one of JSVariable.DATETIME, JSVariable.TEXT, JSVariable.NUMBER , JSVariable.INTEGER or JSVariable.MEDIA.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailsgetNamename

getName()

dessIndent
This method returns the name of the stored calculation.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getName_snc|text=|trigger=button}{sub-section}{sub-section:getName_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getName_prs|text=|trigger=button}{sub-section}{sub-section:getName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getName_ret|text=|trigger=button}{sub-section}{sub-section:getName_ret|trigger=none|class=sIndent}[String] -- the name of the stored calculation{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getName_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getName_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getName_sam|trigger=none}{code:language=javascript} var calc = solutionModel.newCalculation("function myCalculation() { return 123; }", JSVariable.INTEGER, "db:/example_data/customers"); application.output(calc.getName()); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getUUID|class=node}{tr:id=name}{td}h6.getUUID{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[UUID]{span}{span:id=iets|style=float: left; font-weight: bold;}getUUID{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getUUID_des|text=|trigger=button}{sub-section}{sub-section:getUUID_des|trigger=none|class=sIndent}
ret

Returns

sIndent the name of the stored calculation
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowgetUUIDname

getUUID()

dessIndent
Returns the UUID of the calculation.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getUUID_snc|text=|trigger=button}{sub-section}{sub-section:getUUID_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getUUID_prs|text=|trigger=button}{sub-section}{sub-section:getUUID_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getUUID_ret|text=|trigger=button}{sub-section}{sub-section:getUUID_ret|trigger=none|class=sIndent}[UUID]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getUUID_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getUUID_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getUUID_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getUUID_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getUUID_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getUUID_sam|trigger=none}{code:language=javascript} var calc = solutionModel.newCalculation("function myCalculation() { return 123; }", JSVariable.INTEGER, "db:/example_data/customers"); application.output(calc.getUUID().toString()); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=isStored|class=node}{tr:id=name}{td}h6.isStored{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}isStored{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:isStored_des|text=|trigger=button}{sub-section}{sub-section:isStored_des|trigger=none|class=sIndent}
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowhasFlagname

hasFlag(flag)

dessIndent
Check a flag of the calculation.
The flags are a bit pattern consisting of 1 or more of the following bits:
 - JSColumn.UUID_COLUMN
prs

Parameters

sIndentflag ;
ret

Returns

sIndent boolean whether flag is set.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isStoredname

isStored()

dessIndent
Returns whether this calculation is a stored one or not.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:isStored_snc|text=|trigger=button}{sub-section}{sub-section:isStored_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:isStored_prs|text=|trigger=button}{sub-section}{sub-section:isStored_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:isStored_ret|text=|trigger=button}{sub-section}{sub-section:isStored_ret|trigger=none|class=sIndent}[Boolean] -- true if the calculation is stored, false otherwise{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:isStored_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:isStored_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:isStored_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:isStored_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:isStored_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:isStored_sam|trigger=none}{code:language=javascript} var calc = solutionModel.newCalculation("function myCalculation() { return 123; }", JSVariable.INTEGER, "db:/example_data/customers"); if (calc.isStored()) application.output("The calculation is stored"). else application.output("The calculation is not stored"). {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
ret

Returns

sIndent true if the calculation is stored, false otherwise
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow