{column:width=80px|padding=0px}{column}{column}{column}
Property Summary
{column:width=80px|padding=0px}{column}{column}{column}
Method Summary
deleteAllRecords()
Deletes all records in foundset, resulting in empty foundset.
deleteRecord()
Delete current selected record, deletes mulitple selected records incase the foundset is using multiselect.
duplicateRecord()
Duplicate current record or record at index in the form foundset.
duplicateRecord(location)
Duplicate current record or record at index in the form foundset.
duplicateRecord(location)
Duplicate current record or record at index in the form foundset.
void
focusField(fieldName, skipReadonly)
Sets focus to a field specified by its name.
void
focusFirstField()
Sets focus to the first field of the form; based on tab order sequence.
getDataProviderMaxLength(name)
Returns the maximum length allowed in the specified dataprovider.
getDataProviderValue(dataProvider)
Gets a value based on the specified dataprovider name.
getDataSource()
Get the used datasource.
getDesignMode()
Returns the state of this form designmode.
getDesignTimeProperty()
Get a design-time property of a form.
getFormContext()
Gets the forms context where it resides, returns a dataset of its structure to the main controller.
getFormWidth()
Gets the form width in pixels.
getMaxRecordIndex()
Returns the current cached record count of the current foundset.
getPartHeight(partType)
Gets the part height in pixels.
getPartYOffset(partType)
Returns the Y offset of a given part of the form.
getSelectedIndex()
Gets the current record index of the current foundset.
String[]
getTabSequence()
Get an array with the names of the components that are part of the tab sequence.
invertRecords()
Inverts the current foundset against all rows of the current table; all records that are not in the foundset will become the current foundset.
loadAllRecords()
Loads all accessible records from the datasource into the form foundset.
loadOmittedRecords()
Loads the records that are currently omitted in the form foundset.
loadRecords()
Loads all accessible records from the datasource into the form foundset.
loadRecords(foundset)
Loads a (related) foundset into the form.
loadRecords(pkdataset)
Loads a primary key dataset, will remove related sort.
loadRecords(UUIDpk)
Loads a single record by primary key, will remove related sort.
loadRecords(singlenNmber_pk)
Loads a single record by primary key, will remove related sort.
loadRecords(queryString)
Loads records into form foundset based on a query (also known as 'Form by query').
loadRecords(queryString, queryArgumentsArray)
Loads records into form foundset based on a query (also known as 'Form by query').
omitRecord()
Omit current record in form foundset, to be shown with loadOmittedRecords.
void
print()
Print this form with current foundset, without preview.
void
print(printCurrentRecordOnly)
Print this form with current foundset, without preview.
void
print(printCurrentRecordOnly, showPrinterSelectDialog)
Print this form with current foundset, without preview.
void
print(printCurrentRecordOnly, showPrinterSelectDialog, printerJob)
Print this form with current foundset, without preview.
recreateUI()
Recreates the forms UI components, to reflect the latest solution model.
void
relookup()
Performs a relookup for the current foundset record dataproviders.
void
setDataProviderValue(dataprovider, value)
Sets the value based on a specified dataprovider name.
void
setDesignMode(designMode)
Sets this form in designmode with param true, false will return to normal browse/edit mode.
void
setDesignMode(ondrag)
Sets this form in designmode with one or more callback methods.
void
setDesignMode(ondrag, ondrop)
Sets this form in designmode with one or more callback methods.
void
setDesignMode(ondrag, ondrop, onselect)
Sets this form in designmode with one or more callback methods.
void
setDesignMode(ondrag, ondrop, onselect, onresize)
Sets this form in designmode with one or more callback methods.
void
setDesignMode(ondrag, ondrop, onselect, onresize, ondblclick)
Sets this form in designmode with one or more callback methods.
void
setDesignMode(ondrag, ondrop, onselect, onresize, ondblclick, onrightclick)
Sets this form in designmode with one or more callback methods.
void
setPageFormat(width, height, leftmargin, rightmargin, topmargin, bottommargin)
Set the page format to use when printing.
void
setPageFormat(width, height, leftmargin, rightmargin, topmargin, bottommargin, orientation)
Set the page format to use when printing.
void
setPageFormat(width, height, leftmargin, rightmargin, topmargin, bottommargin, orientation, units)
Set the page format to use when printing.
void
setPreferredPrinter(printerName)
Set the preferred printer name to use when printing.
void
setSelectedIndex(index)
Sets the current record index of the current foundset.
void
setTabSequence(arrayOfElements)
Set the tab order sequence programatically, by passing the elements references in a javascript array.
void
show()
Shows the form (makes the form visible)
This function does not affect the form foundset in any way.
void
show(window)
Shows the form (makes the form visible)
This function does not affect the form foundset in any way.
void
show(window)
Shows the form (makes the form visible)
This function does not affect the form foundset in any way.
void
showPrintPreview()
Show this form in print preview.
void
showPrintPreview(printCurrentRecordOnly)
Show this form in print preview.
void
showPrintPreview(printCurrentRecordOnly, printerJob)
Show this form in print preview.
void
showPrintPreview(printCurrentRecordOnly, printerJob, zoomFactor)
Show this form in print preview.
void
showRecords(foundset)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(foundset, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(foundset, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(pkdataset)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(pkdataset, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(pkdataset, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(query)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(query, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(query, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(UUIDpk)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(UUIDpk, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(UUIDpk, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(singleNumber_pk)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(singleNumber_pk, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(singleNumber_pk, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(query)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(query, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(query, argumentsArray)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(query, argumentsArray, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(query, argumentsArray, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
showRecords(query, window)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
void
sort(sortString)
Sorts the form foundset based on the given sort string.
void
sort(sortString, defer)
Sorts the form foundset based on the given sort string.
void
sortDialog()
Show the sort dialog to the user a preselection sortString can be passed, to sort the form foundset.
{column:width=100%|padding=0px}{column}
Property Details
Replace with description
Since
Replace with version info
Parameters
Also see
External links
Sample
//gets the enabled state of the form var state = forms.customer.controller.enabled; //enables the form for input forms.customer.controller.enabled = true;
Replace with description
Since
Replace with version info
Parameters
Also see
External links
Sample
//gets the read-only state of the form var state = forms.customer.controller.readOnly; //sets the read-only state of the form forms.customer.controller.readOnly = true
Replace with description
Since
Replace with version info
Parameters
Also see
External links
Sample
//gets the type of view for this form var view = forms.customer.controller.view; //sets the form to Record view forms.customer.controller.view = 0;//RECORD_VIEW //sets the form to List view forms.customer.controller.view = 1;//LIST_VIEW
{column:width=100%|padding=0px}{column}
Method Details
deleteAllRecords
()
Replace with description
Since
Replace with version info
Parameters
Returns
Boolean – false incase of related foundset having records and orphans records are not allowed by the relation
Also see
External links
Sample
var success = forms.customer.controller.deleteAllRecords();
deleteRecord
()
Replace with description
Since
Replace with version info
Parameters
Returns
Boolean – false incase of related foundset having records and orphans records are not allowed by the relation
Also see
External links
Sample
var success = forms.customer.controller.deleteRecord();
duplicateRecord
()
Replace with description
Since
Replace with version info
Parameters
Returns
Boolean – true if succesful
Also see
External links
Sample
forms.customer.controller.duplicateRecord(); //duplicate the current record, adds on top //forms.customer.controller.duplicateRecord(false); //duplicate the current record, adds at bottom //forms.customer.controller.duplicateRecord(1,2); //duplicate the first record as second record
duplicateRecord
(location)
Replace with description
Since
Replace with version info
Parameters
{Boolean} location – true adds the new record as the topmost record
Returns
Boolean – true if successful
Also see
External links
Sample
forms.customer.controller.duplicateRecord(); //duplicate the current record, adds on top //forms.customer.controller.duplicateRecord(false); //duplicate the current record, adds at bottom //forms.customer.controller.duplicateRecord(1,2); //duplicate the first record as second record
duplicateRecord
(location)
Replace with description
Since
Replace with version info
Parameters
{Number} location – adds at specified index
Returns
Boolean – true if successful
Also see
External links
Sample
forms.customer.controller.duplicateRecord(); //duplicate the current record, adds on top //forms.customer.controller.duplicateRecord(false); //duplicate the current record, adds at bottom //forms.customer.controller.duplicateRecord(1,2); //duplicate the first record as second record
Replace with description
Since
Replace with version info
Parameters
Also see
External links
Sample
if (forms.customer.controller.find()) //find will fail if autosave is disabled and there are unsaved records { columnTextDataProvider = 'a search value' columnNumberDataProvider = '>10' columnDateDataProvider = '31-12-2010|dd-MM-yyyy' forms.customer.controller.search() }
void
focusField
(fieldName, skipReadonly)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
var tabseq = forms.customer.controller.getTabSequence(); if (tabseq.length > 1) { // If there is more than one field in the tab sequence, // focus the second one and skip over readonly fields. forms.customer.controller.focusField(tabseq[1], true); } else { // If there is at most one field in the tab sequence, then focus // whatever field is first, and don't bother to skip over readonly fields. forms.customer.controller.focusField(null, false); }
void
focusFirstField
()
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
forms.customer.controller.focusFirstField();
getDataProviderMaxLength
(name)
Replace with description
Since
Replace with version info
Parameters
{String} name – the dataprovider name
Returns
Number – the length
Also see
External links
Sample
forms.customer.controller.getDataProviderMaxLength('name');
getDataProviderValue
(dataProvider)
Replace with description
Since
Replace with version info
Parameters
{String} dataProvider – the dataprovider name to retieve the value for
Returns
Object – the dataprovider value (null if unknown dataprovider)
Also see
External links
Sample
var val = forms.customer.controller.getDataProviderValue('contact_name');
getDataSource
()
Replace with description
Since
Replace with version info
Parameters
Returns
String – the datasource
Also see
External links
Sample
var dataSource = forms.customer.controller.getDataSource();
getDesignMode
()
Replace with description
Since
Replace with version info
Parameters
Returns
Boolean – the design mode state (true/fase)
Also see
External links
Sample
var success = forms.customer.controller.getDesignMode();
getDesignTimeProperty
()
Replace with description
Since
Replace with version info
Parameters
Also see
External links
Sample
var prop = forms.orders.controller.getDesignTimeProperty('myprop')
getFormContext
()
Replace with description
Since
Replace with version info
Parameters
Returns
JSDataSet – the dataset with form context
Also see
External links
Sample
//dataset columns: [containername(1),formname(2),tabpanel or beanname(3),tabname(4),tabindex(5),tabindex1based(6)] //dataset rows: mainform(1) -> parent(2) -> current form(3) (when 3 forms deep) /** @type {JSDataSet} */ var dataset = forms.customer.controller.getFormContext(); if (dataset.getMaxRowIndex() > 1) { // form is in a tabpanel var parentFormName = dataset.getValue(1,2) }
getFormWidth
()
Replace with description
Since
Replace with version info
Parameters
Returns
Number – the width in pixels
Also see
External links
Sample
var width = forms.customer.controller.getFormWidth();
getMaxRecordIndex
()
Replace with description
Since
Replace with version info
Parameters
Returns
Number – the max record index
Also see
External links
Sample
for ( var i = 1 ; i <= forms.customer.controller.getMaxRecordIndex() ; i++ ) { forms.customer.controller.setSelectedIndex(i); //do some action per record }
getName
()
Replace with description
Since
Replace with version info
Parameters
Returns
String – the name
Also see
External links
Sample
var formName = forms.customer.controller.getName();
getPartHeight
(partType)
Replace with description
Since
Replace with version info
Parameters
{Number} partType – The type of the part whose height will be returned.
Returns
Number – the part height in pixels
Also see
External links
Sample
var height = forms.customer.controller.getPartHeight(JSPart.BODY);
getPartYOffset
(partType)
Replace with description
Since
Replace with version info
Parameters
{Number} partType – The type of the part whose Y offset will be returned.
Returns
Number – A number holding the Y offset of the specified form part.
Also see
External links
Sample
var offset = forms.customer.controller.getPartYOffset(JSPart.BODY);
getSelectedIndex
()
Replace with description
Since
Replace with version info
Parameters
Returns
Number – the index
Also see
External links
Sample
//gets the current record index in the current foundset var current = forms.customer.controller.getSelectedIndex(); //sets the next record in the foundset, will be reflected in UI forms.customer.controller.setSelectedIndex(current+1);
String[]
getTabSequence
()
Replace with description
Since
Replace with version info
Parameters
Returns
String[] – array of names
Also see
External links
Sample
var tabseq = forms.customer.controller.getTabSequence(); if (tabseq.length > 1) { // If there is more than one field in the tab sequence, // focus the second one and skip over readonly fields. forms.customer.controller.focusField(tabseq[1], true); } else { // If there is at most one field in the tab sequence, then focus // whatever field is first, and don't bother to skip over readonly fields. forms.customer.controller.focusField(null, false); }
getWindow
()
Replace with description
Since
Replace with version info
Parameters
Returns
JSWindow – the JSWindow that the form is shown in, or null if the form is not currently showing in a window.
Also see
External links
Sample
var currentWindow = controller.getWindow(); if (currentWindow != null) { currentWindow.title = 'We have a new title'; } else { currentWindow = application.createWindow("Window Name", JSWindow.WINDOW, null); currentWindow(650, 700, 450, 350); currentWindow = "Window Title"; controller.show(currentWindow); }
invertRecords
()
Replace with description
Since
Replace with version info
Parameters
Returns
Boolean – true if successful
Also see
External links
Sample
forms.customer.controller.invertRecords();
loadAllRecords
()
Replace with description
Since
Replace with version info
Parameters
Returns
Boolean – true if successful
Also see
External links
Sample
forms.customer.controller.loadAllRecords();
loadOmittedRecords
()
Replace with description
Since
Replace with version info
Parameters
Returns
Boolean – true if successful
Also see
External links
Sample
forms.customer.controller.loadOmittedRecords();
loadRecords
()
Replace with description
Since
Replace with version info
Parameters
Returns
Boolean – true if successful
Also see
External links
Sample
//to reload all last (related) records again, if for example after a search in related tabpanel forms.customer.controller.loadRecords();
loadRecords
(foundset)
Replace with description
Since
Replace with version info
Parameters
{JSFoundSet} foundset – to load
Returns
Boolean – true if successful
Also see
External links
Sample
//to load a (related)foundset into the form. //the form will no longer share the default foundset with forms of the same datasource, use loadAllRecords to restore the default foundset forms.customer.controller.loadRecords(order_to_orderdetails);
loadRecords
(pkdataset)
Replace with description
Since
Replace with version info
Parameters
{JSDataSet} pkdataset – to load
Returns
Boolean – true if successful
Also see
External links
Sample
//to load a primary key dataset, will remove related sort //var dataset = databaseManager.getDataSetByQuery(...); // dataset must match the table primary key columns (alphabetically ordered) forms.customer.controller.loadRecords(dataset);
loadRecords
(UUIDpk)
Replace with description
Since
Replace with version info
Parameters
{UUID} UUIDpk – to load
Returns
Boolean – true if successful
Also see
External links
Sample
forms.customer.controller.loadRecords(application.getUUID('6b5e2f5d-047e-45b3-80ee-3a32267b1f20'));
loadRecords
(singlenNmber_pk)
Replace with description
Since
Replace with version info
Parameters
{Number} singlenNmber_pk – to load
Returns
Boolean – true if successful
Also see
External links
Sample
forms.customer.controller.loadRecords(123);
loadRecords
(queryString)
Replace with description
Since
Replace with version info
Parameters
{String} queryString – to load
Returns
Boolean – true if successful
Also see
External links
Sample
forms.customer.controller.loadRecords(sqlstring);
loadRecords
(queryString, queryArgumentsArray)
Replace with description
Since
Replace with version info
Returns
Boolean – true if successful
Also see
External links
Sample
forms.customer.controller.loadRecords(sqlstring,parameters);
newRecord
()
Replace with description
Since
Replace with version info
Parameters
Returns
Boolean – true if succesful
Also see
External links
Sample
// foreign key data is only filled in for equals (=) relation items forms.customer.controller.newRecord();//default adds on top //forms.customer.controller.newRecord(false); //adds at bottom //forms.customer.controller.newRecord(2); //adds as second record
newRecord
(insertOnTop)
Replace with description
Since
Replace with version info
Parameters
{Boolean} insertOnTop – true adds the new record as the topmost record
Returns
Boolean – true if successful
Also see
External links
Sample
// foreign key data is only filled in for equals (=) relation items forms.customer.controller.newRecord();//default adds on top //forms.customer.controller.newRecord(false); //adds at bottom //forms.customer.controller.newRecord(2); //adds as second record
newRecord
(location)
Replace with description
Since
Replace with version info
Parameters
{Number} location – adds at specified index
Returns
Boolean – true if successful
Also see
External links
Sample
// foreign key data is only filled in for equals (=) relation items forms.customer.controller.newRecord();//default adds on top //forms.customer.controller.newRecord(false); //adds at bottom //forms.customer.controller.newRecord(2); //adds as second record
omitRecord
()
Replace with description
Since
Replace with version info
Parameters
Returns
Boolean – true if successful
Also see
External links
Sample
var success = forms.customer.controller.omitRecord();
void
()
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
//print this form (with foundset records) forms.customer.controller.print(); //print only current record (no printerSelectDialog) to pdf plugin printer //forms.customer.controller.print(true,false,plugins.pdf_output.getPDFPrinter('c:/temp/out.pdf'));
void
(printCurrentRecordOnly)
Replace with description
Since
Replace with version info
Parameters
{Boolean} printCurrentRecordOnly – to print the current record only
Returns
void
Also see
External links
Sample
//print this form (with foundset records) forms.customer.controller.print(); //print only current record (no printerSelectDialog) to pdf plugin printer //forms.customer.controller.print(true,false,plugins.pdf_output.getPDFPrinter('c:/temp/out.pdf'));
void
(printCurrentRecordOnly, showPrinterSelectDialog)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
//print this form (with foundset records) forms.customer.controller.print(); //print only current record (no printerSelectDialog) to pdf plugin printer //forms.customer.controller.print(true,false,plugins.pdf_output.getPDFPrinter('c:/temp/out.pdf'));
void
(printCurrentRecordOnly, showPrinterSelectDialog, printerJob)
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
//print this form (with foundset records) forms.customer.controller.print(); //print only current record (no printerSelectDialog) to pdf plugin printer //forms.customer.controller.print(true,false,plugins.pdf_output.getPDFPrinter('c:/temp/out.pdf'));
printXML
()
Replace with description
Since
Replace with version info
Parameters
Returns
String – the XML
Also see
External links
Sample
//TIP: see also plugins.file.writeXMLFile(...) var xml = forms.customer.controller.printXML(); //print only current record //var xml = forms.customer.controller.printXML(true);
printXML
(printCurrentRecordOnly)
Replace with description
Since
Replace with version info
Parameters
{Boolean} printCurrentRecordOnly – to print the current record only
Returns
String – the XML
Also see
External links
Sample
//TIP: see also plugins.file.writeXMLFile(...) var xml = forms.customer.controller.printXML(); //print only current record //var xml = forms.customer.controller.printXML(true);
recreateUI
()
Replace with description
Since
Replace with version info
Parameters
Returns
Boolean – true if successful
Also see
External links
Sample
// get the solution model JSForm var form = solutionModel.getForm("myForm"); // get the JSField of the form var field = form.getField("myField"); // alter the field field.x = field.x + 10; // recreate the runtime forms ui to reflect the changes. forms.customer.controller.recreateUI();
void
relookup
()
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
forms.customer.controller.relookup();
search
()
Replace with description
Since
Replace with version info
Parameters
Also see
External links
Sample
var recordCount = forms.customer.controller.search(); //var recordCount = forms.customer.controller.search(false,false); //to extend foundset
search
(clearLastResults)
Replace with description
Since
Replace with version info
Parameters
{Boolean} clearLastResults – boolean, clear previous search, default true
Returns
Number – the recordCount
Also see
External links
Sample
var recordCount = forms.customer.foundset.search(); //var recordCount = forms.customer.foundset.search(false,false); //to extend foundset
search
(clearLastResults, reduceSearch)
Replace with description
Since
Replace with version info
Returns
Number – the recordCount
Also see
External links
Sample
var recordCount = forms.customer.foundset.search(); //var recordCount = forms.customer.foundset.search(false,false); //to extend foundset
void
setDataProviderValue
(dataprovider, value)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.setDataProviderValue('contact_name','mycompany');
void
setDesignMode
(designMode)
Replace with description
Since
Replace with version info
Parameters
{Boolean} designMode – sets form in design mode if true, false ends design mode.
Returns
void
Also see
External links
Sample
var form = forms["selectedFormName"]; if (!form.controller.getDesignMode()) { // Set the current form in designmode with no callbacks form.controller.setDesignMode(true); // Set the current form in designmode with callbacks // where onDrag, onDrop, onSelect, onResize are names of form methods (not from "selectedFormName" form) // form.controller.setDesignMode(onDrag, onDrop, onSelect, onResize); } //Set the current form out of designmode (to normal browse) //form.controller.setDesignMode(false);
void
setDesignMode
(ondrag)
Replace with description
Since
Replace with version info
Parameters
{Function} ondrag – onDrag method reference
Returns
void
Also see
External links
Sample
var form = forms["selectedFormName"]; if (!form.controller.getDesignMode()) { // Set the current form in designmode with no callbacks form.controller.setDesignMode(true); // Set the current form in designmode with callbacks // where onDrag, onDrop, onSelect, onResize are names of form methods (not from "selectedFormName" form) // form.controller.setDesignMode(onDrag, onDrop, onSelect, onResize); } //Set the current form out of designmode (to normal browse) //form.controller.setDesignMode(false);
void
setDesignMode
(ondrag, ondrop)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
var form = forms["selectedFormName"]; if (!form.controller.getDesignMode()) { // Set the current form in designmode with no callbacks form.controller.setDesignMode(true); // Set the current form in designmode with callbacks // where onDrag, onDrop, onSelect, onResize are names of form methods (not from "selectedFormName" form) // form.controller.setDesignMode(onDrag, onDrop, onSelect, onResize); } //Set the current form out of designmode (to normal browse) //form.controller.setDesignMode(false);
void
setDesignMode
(ondrag, ondrop, onselect)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
var form = forms["selectedFormName"]; if (!form.controller.getDesignMode()) { // Set the current form in designmode with no callbacks form.controller.setDesignMode(true); // Set the current form in designmode with callbacks // where onDrag, onDrop, onSelect, onResize are names of form methods (not from "selectedFormName" form) // form.controller.setDesignMode(onDrag, onDrop, onSelect, onResize); } //Set the current form out of designmode (to normal browse) //form.controller.setDesignMode(false);
void
setDesignMode
(ondrag, ondrop, onselect, onresize)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
var form = forms["selectedFormName"]; if (!form.controller.getDesignMode()) { // Set the current form in designmode with no callbacks form.controller.setDesignMode(true); // Set the current form in designmode with callbacks // where onDrag, onDrop, onSelect, onResize are names of form methods (not from "selectedFormName" form) // form.controller.setDesignMode(onDrag, onDrop, onSelect, onResize); } //Set the current form out of designmode (to normal browse) //form.controller.setDesignMode(false);
void
setDesignMode
(ondrag, ondrop, onselect, onresize, ondblclick)
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
var form = forms["selectedFormName"]; if (!form.controller.getDesignMode()) { // Set the current form in designmode with no callbacks form.controller.setDesignMode(true); // Set the current form in designmode with callbacks // where onDrag, onDrop, onSelect, onResize are names of form methods (not from "selectedFormName" form) // form.controller.setDesignMode(onDrag, onDrop, onSelect, onResize); } //Set the current form out of designmode (to normal browse) //form.controller.setDesignMode(false);
void
setDesignMode
(ondrag, ondrop, onselect, onresize, ondblclick, onrightclick)
Replace with description
Since
Replace with version info
Parameters
{Function} ondrag – onDrag method reference
{Function} ondrop – onDrop method reference
{Function} onselect – onSelect method reference
{Function} onresize – onResize method reference
{Function} ondblclick – onDblClick method reference
{Function} onrightclick – onRightClick method reference
Returns
void
Also see
External links
Sample
var form = forms["selectedFormName"]; if (!form.controller.getDesignMode()) { // Set the current form in designmode with no callbacks form.controller.setDesignMode(true); // Set the current form in designmode with callbacks // where onDrag, onDrop, onSelect, onResize are names of form methods (not from "selectedFormName" form) // form.controller.setDesignMode(onDrag, onDrop, onSelect, onResize); } //Set the current form out of designmode (to normal browse) //form.controller.setDesignMode(false);
void
setPageFormat
(width, height, leftmargin, rightmargin, topmargin, bottommargin)
Replace with description
Since
Replace with version info
Parameters
{Number} width – the specified width of the page to be printed.
{Number} height – the specified height of the page to be printed.
{Number} leftmargin – the specified left margin of the page to be printed.
{Number} rightmargin – the specified right margin of the page to be printed.
{Number} topmargin – the specified top margin of the page to be printed.
{Number} bottommargin – the specified bottom margin of the page to be printed.
Returns
void
Also see
External links
Sample
//Set page format to a custom size of 100x200 pixels with 10 pixel margins on all sides in portrait mode forms.customer.controller.setPageFormat(100, 200, 10, 10, 10, 10); //Set page format to a custom size of 100x200 pixels with 10 pixel margins on all sides in landscape mode forms.customer.controller.setPageFormat(100, 200, 10, 10, 10, 10, SM_ORIENTATION.LANDSCAPE); //Set page format to a custom size of 100x200 mm in landscape mode forms.customer.controller.setPageFormat(100, 200, 0, 0, 0, 0, SM_ORIENTATION.LANDSCAPE, SM_UNITS.MM); //Set page format to a custom size of 100x200 inch in portrait mode forms.customer.controller.setPageFormat(100, 200, 0, 0, 0, 0, SM_ORIENTATION.PORTRAIT, SM_UNITS.INCH);
void
setPageFormat
(width, height, leftmargin, rightmargin, topmargin, bottommargin, orientation)
Replace with description
Since
Replace with version info
Parameters
{Number} width – the specified width of the page to be printed.
{Number} height – the specified height of the page to be printed.
{Number} leftmargin – the specified left margin of the page to be printed.
{Number} rightmargin – the specified right margin of the page to be printed.
{Number} topmargin – the specified top margin of the page to be printed.
{Number} bottommargin – the specified bottom margin of the page to be printed.
{Number} orientation – the specified orientation of the page to be printed; the default is Portrait mode
Returns
void
Also see
External links
Sample
//Set page format to a custom size of 100x200 pixels with 10 pixel margins on all sides in portrait mode forms.customer.controller.setPageFormat(100, 200, 10, 10, 10, 10); //Set page format to a custom size of 100x200 pixels with 10 pixel margins on all sides in landscape mode forms.customer.controller.setPageFormat(100, 200, 10, 10, 10, 10, SM_ORIENTATION.LANDSCAPE); //Set page format to a custom size of 100x200 mm in landscape mode forms.customer.controller.setPageFormat(100, 200, 0, 0, 0, 0, SM_ORIENTATION.LANDSCAPE, SM_UNITS.MM); //Set page format to a custom size of 100x200 inch in portrait mode forms.customer.controller.setPageFormat(100, 200, 0, 0, 0, 0, SM_ORIENTATION.PORTRAIT, SM_UNITS.INCH);
void
setPageFormat
(width, height, leftmargin, rightmargin, topmargin, bottommargin, orientation, units)
Replace with description
Since
Replace with version info
Parameters
{Number} width – the specified width of the page to be printed.
{Number} height – the specified height of the page to be printed.
{Number} leftmargin – the specified left margin of the page to be printed.
{Number} rightmargin – the specified right margin of the page to be printed.
{Number} topmargin – the specified top margin of the page to be printed.
{Number} bottommargin – the specified bottom margin of the page to be printed.
{Number} orientation – the specified orientation of the page to be printed; the default is Portrait mode
{Number} units – the specified units for the width and height of the page to be printed; the default is pixels
Returns
void
Also see
External links
Sample
//Set page format to a custom size of 100x200 pixels with 10 pixel margins on all sides in portrait mode forms.customer.controller.setPageFormat(100, 200, 10, 10, 10, 10); //Set page format to a custom size of 100x200 pixels with 10 pixel margins on all sides in landscape mode forms.customer.controller.setPageFormat(100, 200, 10, 10, 10, 10, SM_ORIENTATION.LANDSCAPE); //Set page format to a custom size of 100x200 mm in landscape mode forms.customer.controller.setPageFormat(100, 200, 0, 0, 0, 0, SM_ORIENTATION.LANDSCAPE, SM_UNITS.MM); //Set page format to a custom size of 100x200 inch in portrait mode forms.customer.controller.setPageFormat(100, 200, 0, 0, 0, 0, SM_ORIENTATION.PORTRAIT, SM_UNITS.INCH);
void
setPreferredPrinter
(printerName)
Replace with description
Since
Replace with version info
Parameters
{String} printerName – The name of the printer to be used when printing.
Returns
void
Also see
External links
Sample
forms.customer.controller.setPreferredPrinter('HP Laser 2200');
void
setSelectedIndex
(index)
Replace with description
Since
Replace with version info
Parameters
{Number} index – the index to select
Returns
void
Also see
External links
Sample
//gets the current record index in the current foundset var current = forms.customer.controller.getSelectedIndex(); //sets the next record in the foundset, will be reflected in UI forms.customer.controller.setSelectedIndex(current+1);
void
setTabSequence
(arrayOfElements)
Replace with description
Since
Replace with version info
Parameters
{Object[]} arrayOfElements – array containing the element references
Returns
void
Also see
External links
Sample
forms.customer.controller.setTabSequence([forms.customer.elements.fld_order_id, forms.customer.elements.fld_order_amount]);
void
show
()
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
// show the form in the current window/dialog forms.customer.controller.show(); // show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.show(w); // show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.show(w); // or forms.customer.controller.show("mydialog"); //show the form in the main window //forms.customer.controller.show(null);
void
show
(window)
Replace with description
Since
Replace with version info
Parameters
{JSWindow} window – the window in which this form should be shown, given as a window object
Returns
void
Also see
External links
Sample
// show the form in the current window/dialog forms.customer.controller.show(); // show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.show(w); // show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.show(w); // or forms.customer.controller.show("mydialog"); //show the form in the main window //forms.customer.controller.show(null);
void
show
(window)
Replace with description
Since
Replace with version info
Parameters
{String} window – the window in which this form should be shown, specified by the name of an existing window
Returns
void
Also see
External links
Sample
// show the form in the current window/dialog forms.customer.controller.show(); // show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.show(w); // show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.show(w); // or forms.customer.controller.show("mydialog"); //show the form in the main window //forms.customer.controller.show(null);
void
showPrintPreview
()
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
//shows this form (with foundset records) in print preview forms.customer.controller.showPrintPreview(); //to print preview current record only //forms.customer.controller.showPrintPreview(true); //to print preview current record only with 125% zoom factor; //forms.customer.controller.showPrintPreview(true, null, 125);
void
showPrintPreview
(printCurrentRecordOnly)
Replace with description
Since
Replace with version info
Parameters
{Boolean} printCurrentRecordOnly – to print the current record only
Returns
void
Also see
External links
Sample
//shows this form (with foundset records) in print preview forms.customer.controller.showPrintPreview(); //to print preview current record only //forms.customer.controller.showPrintPreview(true); //to print preview current record only with 125% zoom factor; //forms.customer.controller.showPrintPreview(true, null, 125);
void
showPrintPreview
(printCurrentRecordOnly, printerJob)
Replace with description
Since
Replace with version info
Parameters
{Boolean} printCurrentRecordOnly – to print the current record only
{[PrinterJob]} printerJob – print to plugin printer job, see pdf printer plugin for example (incase print is used from printpreview)
Returns
void
Also see
External links
Sample
//shows this form (with foundset records) in print preview forms.customer.controller.showPrintPreview(); //to print preview current record only //forms.customer.controller.showPrintPreview(true); //to print preview current record only with 125% zoom factor; //forms.customer.controller.showPrintPreview(true, null, 125);
void
showPrintPreview
(printCurrentRecordOnly, printerJob, zoomFactor)
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
//shows this form (with foundset records) in print preview forms.customer.controller.showPrintPreview(); //to print preview current record only //forms.customer.controller.showPrintPreview(true); //to print preview current record only with 125% zoom factor; //forms.customer.controller.showPrintPreview(true, null, 125);
void
showRecords
(foundset)
Replace with description
Since
Replace with version info
Parameters
{JSFoundSet} foundset – the foundset to load before showing the form.
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(foundset, window)
Replace with description
Since
Replace with version info
Parameters
{JSFoundSet} foundset – the foundset to load before showing the form.
{JSWindow} window – the window in which this form should be shown, given as a window object.
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(foundset, window)
Replace with description
Since
Replace with version info
Parameters
{JSFoundSet} foundset – the foundset to load before showing the form.
{String} window – the window in which this form should be shown, specified by the name of an existing window.
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(pkdataset)
Replace with description
Since
Replace with version info
Parameters
{JSDataSet} pkdataset – the pkdataset to load before showing the form.
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(pkdataset, window)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(pkdataset, window)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(query)
Replace with description
Since
Replace with version info
Parameters
{QBSelect} query – the query to load before showing the form.
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(query, window)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(query, window)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(UUIDpk)
Replace with description
Since
Replace with version info
Parameters
{UUID} UUIDpk – the UUIDpk to load before showing the form.
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(UUIDpk, window)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(UUIDpk, window)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(singleNumber_pk)
Replace with description
Since
Replace with version info
Parameters
{Number} singleNumber_pk – the singleNumber_pk to load before showing the form.
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(singleNumber_pk, window)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(singleNumber_pk, window)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(query)
Replace with description
Since
Replace with version info
Parameters
{String} query – the query to load before showing the form.
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(query, window)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(query, argumentsArray)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(query, argumentsArray, window)
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(query, argumentsArray, window)
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
showRecords
(query, window)
Replace with description
Since
Replace with version info
Returns
void
Also see
External links
Sample
forms.customer.controller.showRecords(foundset); // load foundset & show the form in newly created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); //forms.customer.controller.showRecords(foundset, "mydialog");
void
sort
(sortString)
Replace with description
Since
Replace with version info
Parameters
{String} sortString – the specified columns (and sort order)
Returns
void
Also see
External links
Sample
forms.customer.controller.sort('columnA desc,columnB asc');
void
sort
(sortString, defer)
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
forms.customer.controller.sort('columnA desc,columnB asc');
void
sortDialog
()
Replace with description
Since
Replace with version info
Parameters
Returns
void
Also see
External links
Sample
forms.customer.controller.sortDialog('columnA desc,columnB asc');
void
sortDialog
(sortString)
Replace with description
Since
Replace with version info
Parameters
{String} sortString – the specified columns (and sort order)
Returns
void
Also see
External links
Sample
forms.customer.controller.sortDialog('columnA desc,columnB asc');