{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:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#dateFormat]\(date, format)
Format a date object to a text representation.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasRecords]\(foundset)
Returns true if the (related)foundset exists and has records.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasRecords]\(record, relationString)
Returns true if the (related)foundset exists and has records.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#numberFormat]\(number, digits)
Format a number to have a defined fraction.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#numberFormat]\(number, format)
Format a number to specification.{td}{tr}{tbody}{table}\\
{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=dateFormat|class=node}{tr:id=name}{td}h6.dateFormat{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}dateFormat{span}{span:id=iets|style=float: left;}\(date, format){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:dateFormat_des|trigger=button|text=}{sub-section}{sub-section:dateFormat_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:dateFormat_snc|trigger=button|text=}{sub-section}{sub-section:dateFormat_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:dateFormat_prs|trigger=button|text=}{sub-section}{sub-section:dateFormat_prs|trigger=none|class=sIndent}\{[Date]} date -- the date
\{[String]} format -- the format to output
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:dateFormat_ret|trigger=button|text=}{sub-section}{sub-section:dateFormat_ret|trigger=none|class=sIndent}[String] -- the date as text{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:dateFormat_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:dateFormat_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:dateFormat_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:dateFormat_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:dateFormat_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:dateFormat_sam|trigger=none}{code:language=javascript}
Div
style
display:none
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.
Enter additional information related to this 'class' inside the {div} macro with 'id=description'
var formattedDateString = utils.dateFormat(dateobject,'EEE, d MMM yyyy HH:mm:ss');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasRecords-JSFoundSet|class=node}{tr:id=name}{td}h6.hasRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasRecords{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:hasRecords-JSFoundSet_des|trigger=button|text=}{sub-section}{sub-section:hasRecords-JSFoundSet_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:hasRecords-JSFoundSet_snc|trigger=button|text=}{sub-section}{sub-section:hasRecords-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasRecords-JSFoundSet_prs|trigger=button|text=}{sub-section}{sub-section:hasRecords-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- the foundset to be tested
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasRecords-JSFoundSet_ret|trigger=button|text=}{sub-section}{sub-section:hasRecords-JSFoundSet_ret|trigger=none|class=sIndent}[Boolean] -- true if exists{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasRecords-JSFoundSet_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasRecords-JSFoundSet_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasRecords-JSFoundSet_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSFoundSet_sam|trigger=none}{code:language=javascript}
Returns true if the (related)foundset exists and has records. Another use is, to pass a record and qualified relations string to test multiple relations/foundset at once
if (elements.customer_id.hasRecords(orders_to_orderitems))
{
//do work on relatedFoundSet
}
//test the orders_to_orderitems.orderitems_to_products foundset to be reached from the current record
//if (elements.customer_id.hasRecords(foundset.getSelectedRecord(),'orders_to_orderitems.orderitems_to_products'))
//{
// //do work on deeper relatedFoundSet
//}
{span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:hasRecords-JSRecord_String_des|trigger=button|text=}{sub-section}{sub-section:hasRecords-JSRecord_String_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:hasRecords-JSRecord_String_snc|trigger=button|text=}{sub-section}{sub-section:hasRecords-JSRecord_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasRecords-JSRecord_String_prs|trigger=button|text=}{sub-section}{sub-section:hasRecords-JSRecord_String_prs|trigger=none|class=sIndent}\{[JSRecord]} record -- A JSRecord to test.
\{[String]} relationString -- The relation name.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasRecords-JSRecord_String_ret|trigger=button|text=}{sub-section}{sub-section:hasRecords-JSRecord_String_ret|trigger=none|class=sIndent}[Boolean] -- true if the foundset/relation has records.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasRecords-JSRecord_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSRecord_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasRecords-JSRecord_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSRecord_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasRecords-JSRecord_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSRecord_String_sam|trigger=none}{code:language=javascript}
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Returns true if the (related)foundset exists and has records. Another use is, to pass a record and qualified relations string to test multiple relations/foundset at once
Table Row (tr)
id
prs
Table Cell (td)
Parameters
Div
class
sIndent
{JSRecord} record - A JSRecord to test. {String} relationString - The relation name.
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
Boolean - true if the foundset/relation has records.
Table Row (tr)
id
sam
Table Cell (td)
Sample
Div
class
sIndent
Code Block
language
javascript
//test the orders_to_orderitems foundset
if (elements.customer_id.hasRecords(orders_to_orderitems))
{
//do work on relatedFoundSet
}
//test the orders_to_orderitems.orderitems_to_products foundset to be reached from the current record
//if (elements.customer_id.hasRecords(foundset.getSelectedRecord(),'orders_to_orderitems.orderitems_to_products'))
//{
// //do work on deeper relatedFoundSet
//}
{span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:numberFormat-Number_Number_des|trigger=button|text=}{sub-section}{sub-section:numberFormat-Number_Number_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:numberFormat-Number_Number_snc|trigger=button|text=}{sub-section}{sub-section:numberFormat-Number_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:numberFormat-Number_Number_prs|trigger=button|text=}{sub-section}{sub-section:numberFormat-Number_Number_prs|trigger=none|class=sIndent}\{[Number]} number -- the number to format
\{[Number]} digits -- nr of digits
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:numberFormat-Number_Number_ret|trigger=button|text=}{sub-section}{sub-section:numberFormat-Number_Number_ret|trigger=none|class=sIndent}[String] -- the resulting number in text{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:numberFormat-Number_Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberFormat-Number_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:numberFormat-Number_Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberFormat-Number_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:numberFormat-Number_Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberFormat-Number_Number_sam|trigger=none}{code:language=javascript}
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Format a number to have a defined fraction.
Table Row (tr)
id
prs
Table Cell (td)
Parameters
Div
class
sIndent
{Number} number - the number to format {Number} digits - nr of digits
{span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:numberFormat-Number_String_des|trigger=button|text=}{sub-section}{sub-section:numberFormat-Number_String_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:numberFormat-Number_String_snc|trigger=button|text=}{sub-section}{sub-section:numberFormat-Number_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:numberFormat-Number_String_prs|trigger=button|text=}{sub-section}{sub-section:numberFormat-Number_String_prs|trigger=none|class=sIndent}\{[Number]} number -- the number to format
\{[String]} format -- the format
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:numberFormat-Number_String_ret|trigger=button|text=}{sub-section}{sub-section:numberFormat-Number_String_ret|trigger=none|class=sIndent}[String] -- the resulting number in text{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:numberFormat-Number_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberFormat-Number_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:numberFormat-Number_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberFormat-Number_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:numberFormat-Number_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberFormat-Number_String_sam|trigger=none}{code:language=javascript}
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Format a number to specification.
Table Row (tr)
id
prs
Table Cell (td)
Parameters
Div
class
sIndent
{Number} number - the number to format {String} format - the format