1 Methods

Name Description
addConsoleErrorMessage(nfname, errmsg) Adds an error message to Axional Studio Console.
addConsoleWarningMessage(nfname, errmsg) Adds an alert message to Axional Studio Console.
buildFormautoURL(rep_code, cond) Obtains URL in order to open a form.
canInput() Determines if the form accepts data entry.
cartviewAddRow(p_boxid, values) Adds a line on the basket by dinamically way.
cartviewClear(p_boxid) Deletes all data of a shopping basket.
cartviewCommit(p_boxid) Executes generation script for a shopping basket.
closeModalFormauto() Close modal formauto opened previosly with openModalFormauto function.
ColumnInspector(inspect, colorig, coldest) It is a structure used to interpret an inspection of a column against an event.
dateToMDY(date) Transforms a date of an user form to a date of MDY format.
executeAsyncQueryMap(query_code, params, success, error) This function has same functionality as executeQueryMap.
executeAsyncQueryValue(query_code, params, success, error) This function has same functionality as executeQueryValue.
executeAsyncQueryValues(query_code, params, success, error) This function has same functionality as executeQueryValues.
executeBoxButton(p_boxid, btnpos) Executes defined action to a form button related with a determined box.
executeButton(btnpos) Executes defined action for a form button.
executeClickObservableEvent(p_boxid, p_record) Fires click event on an observable box.
executeDelete() Allows to delete actual register.
executeFormAction(action_code) Executes defined action by its mnemonic code.
executeInsert() Allows to insert actual register.
executeQueryMap(query_code, params, success, error) Executes an SQL sentence defined previously on actual object.
executeQueryValue(query_code, params, success, error) Executes an SQL sentence defined previously on actual object.
executeQueryValues(query_code, params, success, error) Executes an SQL sentence defined previously on a ctual object.
executeReload(mandatory) Allows to force the load cursor.
executeReloadRow(mandatory) Allows to force the load the current row.
executeReset() Allows to force reset of the form.
executeSelectObservableEvent(p_boxid, p_records) Fires select event on an observable box.
executeUpdate() Allows to force modification of actual register.
getBoxID(nmemo) Obtains an only data base identifier.
getBoxSelection(p_boxid) Obtains the selection of a box with selected data.
getCurrent() Obtains data and actual time.
getCurrentRowIndex() Obtains file which is being edited manually.
getDbms() Obtains actual database.
getDict() Obtains the dictionary on which object has been defined.
getFieldByName(fieldName) Obtains form field identified by indicated name.
getFieldChanged(fieldName) Determines if a field has been modified from last transaction or form load.
getFieldError(fieldName) Obtains error message of a field.
getFieldIsAnArray(field) Determines if it exists more than one field on the form with same name.
getFieldValue(fieldName, withoutAlert) Obtains field value of a form.
getFirstArrayElement(data) Obtains the first element of an array.
getGlobalNumber(tabname, colname) Recovers a variable from a group of global variables.
getGlobalObject(tabname, colname) Recovers a variable from a group of global variables.
getGlobalString(tabname, colname) Recovers a variable from a group of global variables.
getLabelMessage(code, defmsg, param3, param4,..., paramN) Obtains a tab defined on actual database dictionaries to user language.
getParentCode() Obtains the object code of father form.
getParentFieldValue(colname) Obtains the value of the father form column.
getParentSubmitValue(colname) Obtains the value of the father form column.
getQueryCond(excludeVars) Obtains the sql condition used to make the cursor.
getQueryValue(sql, doNotUseCache, callback, errcallback, scope) Executes a SQL sentence on the actual database.
getQueryValues(sql, doNotUseCache, allowMultipleRows, callback, errcallback, scope) Executes SQL sentence on the actual database.
getRepCode() Obtains object code of the form.
getRealRepCode() Obtains object code of the form.
getSubmitValue(fieldName) Obtains the value of a form field to the necessary form in order to send it to the server.
getTime() Obtains actual date.
getToday() Obtains actual date.
getUser() Obtains Axional Studio user.
getUserDateFormat() Obtains Axional Studio date format used by the connection user.
getUserDecimalSeparator() Obtains Axional Studio decimals separator character by the connection user.
getVariableValue(varname) Obtains value from a variable of a form.
hasFieldMultipleSelection(fieldName) Determines if the field allows to select several values through references window.
hasTransactions() Determines if a form has authorized transactions.
Hashtable() This structure has been used from tags to global variables generation.
insertRequiresReset() Forces user to execute form reset before an insertion.
isFieldDate(fieldName) Determines if a field is a date type.
isFieldNumeric(fieldName) Determines if a field is a numeric type.
isJavascriptConsoleActive() Determines if a Javascript console user is available.
isMultiRow() Determines if a form accepts multiples registers.
isOnCompatibility() It is used during system migration.
isOnInsert() Determines if a form is ready in order to do the insertion.
isOnUpdate() Determines if a form is ready in order to do modification.
isOutputColumn(colname) Determines if a column belongs to a form.
isReadOnly() Determines if a form is a reading type.
isRowSelected() Determines if there is a selected register on a form.
JSQL_disableCheck(name) Disables Javascript verification of a restriction.
JSQL_disableDelete(reason) Disables deleted transactions of a form.
JSQL_disableInsert(reason) Disables insertion transactions of a form.
JSQL_disableReset(reason) Disables reset transactions of the form.
JSQL_disableSingleRowSelection() Allows to deactivate dynamically new fixed register.
JSQL_disableUpdate(reason) Disables modification transactions of the form.
JSQL_disableVerifyExist(fieldName) Disables the hard existence proof.
JSQL_enableUnconditionalInput() Allows the existence of fields edited on a form without transactions.
JSQL_enableVerifyExist(fieldName) Activates the hard existence proof.
JSQL_execute_StatementAndRefresh(cmd, cmd_crc, args) Executes an SQL/XML Sentence and loads a form after its execution.
JSQL_getMessage(code) Obtains a defined tag on actual database on dictionaries to user language.
JSQL_MakeXSQLScriptCall(scriptname, arg1,arg2,...,argN) Obtains necessary syntax to realize an XSQL-Script call.
numberRoundDecimal(num, dec) Round off a decimal value with indicated precision.
openModalFields (title, message, fields, buttons, callback) Show a modal window with messages and/or form fields and execute a callback function on click accept button.
openModalFormauto(title, rep_code, cond, vars, closecallback, allowDetach) Show a modal window with title and the iframe of object.
playErrorSound() Emits an error sound.
setBoxVisible(p_boxid, visible) Shows/Hides out the form box.
setBoxesVisible(boxes) Shows/Hides out a group of boxes.
setButtonBoxDisabled(p_boxid, btnpos, disabled) Allows to disable/enable a button of a form box.
setButtonDisabled(btnpos, disabled) Allows to disable/enable a button of a form box.
setCurrentRowIndex(rowindex) Activates indicated file for the edition.
setDatablockVisible(blockID, visible) Shows/Hides out a whole datablock.
setFieldChanged(fieldName, changed, execute) Allows to force modified option of a field.
setFieldError(field, error, isFormatingError) It indicates a field with its indicated error.
setFieldExistAllowMultipleRows(fieldName, allowmr) For a field with integration relation.
setFieldExistDisableVerify(fieldName, disable) For a field with integration relation.
setFieldExistValues(fieldName, objdest, coldest, qrycond, noCache) Modifies integrated references of a field.
setFieldFocus(fieldName) Places cursor on indicated field.
setFieldNoentry(fieldName, noEntry) Allows to indicate if a field can be edited or not.
setFieldNullable(fieldName, isNullable) Allows to indicate if a field is required or not.
setFieldPreserveOnClear(fieldName) Indicates that the field cannot be affected by reset.
setFieldValue(fieldName, fieldValue, noVerifyExistNeed) Fixes value of a field form.
setFieldValues(tabname, map) Realizes a massive assignation of values to a form fields.
setFieldVisible(fieldName, visible) Allows to hide out/show a dynamic field.
setFixedValue(fieldName) It establishes the value of a field.
setGlobal(tabname, tabdata) Installs a group of global variables.
setInsertRequiresReset() It forces to user to execute reset form before an insertion.
setTransactionSize(size) Indicates rows size of insert transaction.
showErrorDialog(errOpts) Shows a dialog screen with all errors reported.
sqldotSetData(p_boxid, data) Updates data in order to represent DOT object.
sqlocrAddCreateEvent(p_boxid, callback, scope)
sqlocrClearHighlight(p_boxid)
sqlocrDisableMouseSelect(p_boxid)
sqlocrEnableMouseSelect(p_boxid, detach)
sqlocrGetPage(p_boxid)
sqlocrSetPage(p_boxid, numpage, callback, scope)
sqlocrTextHighlight(p_boxid, regex, group, offsetRows, offsetCols, nRows, nCols) Marks a part of the column text of Blob object.
sqltableAddEvent(p_boxid, evtname, callback) Adds an event to the table.
sqltableAddFieldEvent(p_boxid, colname, evtname, callback) Adds an event to the column.
sqltableAddRow(p_boxid) Adds a line to SQL table dynamically.
sqltableClear(p_boxid) Deletes all content of a SQL table.
sqltableGetByID(p_boxid) Obtains a SQL table of the form.
sqltableGetFieldValue(p_boxid, colname, rowid) Obtains the cell value of a SQL table.
sqltableGetSelected(p_boxid) Obtains data of selected files from a SQL table.
sqltableRefresh(p_boxid) Reloads the content of a SQL table.
sqltableSearchBy(p_boxid, colexpr, callback) Obtains data of a selected file from a SQL table.
sqltableSelRow(boxid, rowid) Selects a file from a SQL table.
sqltableSetFieldError(p_boxid, colname, errmsg, rowid) Allows to define a mistake from a field file of a SQL table.
sqltableSetFieldValue(p_boxid, colname, data, rowid) Modifies the value of a cell from a SQL table.
sqltableToggleSelection(p_boxid) Modifies the selection of all files from SQL table.
sqltableToggleRowSelection(p_boxid, rowindex) Modifies the selection of a file from SQL table.
sqltreeGetSelected(p_boxid) Obtains data of selected files from a SQL tree.
sqltreeRefreshNode(p_boxid, p_parentnode, p_nodevaluesID, loadlcallback) Refresh content of tree node.
sqltreeRefreshNodeByPath(p_boxid, p_path, loadlcallback) Refresh content of tree node.
toFileAddTotalColumn(col)
toFileMarkAll() Selects all visible files from a multisection form.
toFileUnmarkAll() Unselects all visible files of a multisection form.
toFileSwitchLines() Changes selection of all visible files from a multi section form.
toFileVerifyMarks() Verifies if exists any selected file on a multi section form.

addConsoleErrorMessage (nfname, errmsg)

Adds an error message to Axional Studio Console. If user doesn't have console activated, message won't appear.

Settings Parameters:

  • nfname: string

    Name of the function origin of the log.

  • errmsg: string

    Message to be showed on the console.

addConsoleWarningMessage (nfname, errmsg)

Adds an alert message to Axional Studio Console. If user doesn't have console, message won't be showed.

Parameters:

  • nfname: string

    Function name of log origin.

  • errmsg: string

    Message to be showed on the console.

buildFormautoURL (rep_code, cond) : string

Obtains the URL in order to open a form.

Parameters:

  • rep_code: string

    Object code to be opened.

  • cond: string

    Filter condition.

Since:

  • 27/11/2015

canInput () : boolean

Determines if a form accepts data entrance.

Return:

  • boolean

    -true if user has input fields and necessary permisions in order to get inside data.

    -false on the opposite way.

Since:

  • 30/12/2016

cartviewAddRow (p_boxid, values)

Adds a line on a basket shopping dynamically. New line will have all values as a parameters. In addition, it will be as mode edition and cursor will be on the first field editable.

Parameters:

  • p_boxid: string/number

    It can be either nmemotèchnic code of (boxcode) box, as intern identifier of (boxid) data base.

  • values: Object[]

    Array of values to be assigned to new line. It must contain many registers as columns of shopping basket.

cartviewClear (p_boxid)

Deletes all data of a shopping basket.

Parameters:

  • p_boxid: string/number

    It can be either nmemotèchnic code of (boxcode) box, as intern identifier of (boxid) data base.

cartviewCommit (p_boxid)

Executes generation script for a shopping basket.

Parameters:

  • p_boxid: string/number

    It can be either nmemotèchnic code of (boxcode) box, as intern identifier of (boxid) data base.

closeModalFormauto ()

Close modal formauto opened previosly with openModalFormauto function

Since:

  • 05/07/2018

ColumnInspector (inspect, colorig, coldest)

It is a structure generated by a programmer in order to interpose the inspection of a column in front of an event. It is available by introducing a style code.

Deprecated

dateToMDY (date) : string

Converts a date to an user form to MDY format, ready to be used on SQL sentence.

Parameters:

  • date: string

    Date on user format.

Returns:

  • string

    Date on MDY format.

Since:

  • 14/12/2016

executeAsyncQueryMap (query_code, params, success, error)

This function has same functionality as executeQueryMap, with the difference that server connection is done by asynchronous way. In consequence, function finalizes before receive server answer; for this reason, function don't return obtained result. It is needed to collect it through success function passed as a parameter.

Parameters:

  • query_code: string

    Identifier of SQL sentence to be executed. Each sentence must be previously defined on a table wic_jrep_form_query for actual object.

  • params: Object[] (Optional)

    Execution parameters of the query, that will be replaced with query characters '?'. This parameters have to be defined before on wic_jrep_form_query_field table for actual object and query defined for query_code.

  • success: function (Optional)

    The Function is executed when SQL Sentence is executed successfully. The function receives following parameters:

    * data: Map with objects returned by sentence on JSON format, where each key corresponds with resultSet alias of resultSet created by the execution of SQL sentence.

    It is also possible to obtain data from the object by data.get("index") function.

  • error: function(optional)

    Function to be executed in case that SQL Sentence couldn't be executed. Function receives following parameters:

    * errmsg: Error message.

Since:

  • 14/04/2016

executeAsyncQueryValue (query_code, params, success, error)

This function has same functionality as executeQueryValue, with the difference that connection with server is done by asynchronous way. In consequence, function finalizes before receiving server answer; for this reason, function doesn't return the obtained result, it is needed to collect it through function success reflected as a parameter.

  • query_code: string

    Identifier SQL sentence to be executed. Each sentence has to be defined on table wic_jrep_form_query to actual object.

  • params: Object[] (Optional)

    Execution parameters of the query that will be replaced by characters '?' of the query. These parameters have to be defined on wic_jrep_form_query_field table to actual object and the query has to be defined by with a query_code.

  • success: function (Optional)

    Function executed when SQL sentence has been executed successfully. Function receives following parameters:

    * data: Map with objects returned by sentence on JSON format, where each key corresponds with resultSet alias of resultSet created by the execution of SQL sentence.

    It is also possible to obtain data of the object through function data.get("index").

  • error: function (Optional)

    Function to be executed in case that SQL Sentence couldn't be executed. Function receives following parameters:

    * errmsg: Mensaje de error.

Since:

  • 14/04/2016

executeAsyncQueryValues (query_code, params, success, error)

This function has same functionality as executeQueryValue, with the difference that connection with server is done by asynchronous way. In consequence, function finalizes before receiving server answer; for this reason, function doesn't return the obtained result, it is needed to collect it through function success reflected as a parameter.

Parameters:

  • query_code: string

    Identifier of SQL sentence to be executed. Each sentence has to be defined on table wic_jrep_form_query to actual object.

  • params: Object[] (Optional)

    Execution query parameters, that will be replaced by '?' characters of the query. These parameters have to be defined before on wic_jrep_form_query_field table for actual object and query defined by query_code..

  • success: function (Optional)

    Function executed when SQL sentence has been executed successfully. Function receives following parameters:

    * data: objects map returned by sentence on JSON format, where the key of each attribute is related with resultSet alias generated by SQL sentence execution.

    It is also possible to obtain object data through data.get("index") function.

  • error: function (Optional)

    Function executed in case that SQL sentence couldn't be executed. Function receives following parameters:

    * errmsg: Error message

Since:

  • 14/04/2016

executeBoxButton (p_boxid, btnpos)

Executes defined action for a form associated with a defined box when it isn't hide out or disabled by hiding/activation expressions on button definition.

Deprecated:

  • 20/05/2019

    Instead of that, use function executeFormAction.

Parameters:

  • p_boxid: string/number

    It can be either nmeotechnic (boxcode) box, or intern identifier of database (boxid).

  • btnpos: integer

    Button position, with identifier box, determines button to be executed.

executeButton (btnpos)

Executes defined action for a form button related with a determinated box when it doesn't be hide out or disabled by expressions of hiding/activation of button definition.

Deprecated:

  • 20/05/2019

    Instead of that, use function executeFormAction.

Parameters:

  • btnpos: integer

    Button position with box identifier determines the button to be executed.

executeClickObservableEvent (p_boxid, p_record)

Fires click event on an observable box. (Observable box has to support it event)

Settings Parameters:

  • p_boxid: string or number

    Observable box Id or memotecnic

  • p_record

    JSON with the record used to refresh the observer box.

Example:

Copy
executeClickObservableEvent ("BOX_SQLTABLE", { id:1 })
executeDelete ()

Allows to force the elimination of an actual register when user has necessary permissions.

Since:

  • 11/01/2017

executeFormAction (action_code)

Executes action defined by its mnemonic code.

Parameters:

  • action_code: string

    Mnemotechnic code.

executeInsert ()

Allows to force the insertion of an actual register when user has necessary permissions.

Since:

  • 11/01/2017

executeQueryMap (query_code, params, success, error) : Object[]

Executes an SQL Sentence defined before on actual object. All parameters have always been received as an objects as Javascript (string, number, Date, ...) Sentence result can return a single register.

Parameters:

  • query_code: string

    Identifier of SQl sentence to be executed. Each sentence has to be defined before on the table wic_jrep_form_query for actual object.

  • params: Object[] (Optional)

    Execution parameters of the query, that will be replaced by '?' characters of the query. This parameters have to be defined before on wic_jrep_form_query_field table for actual object and the query defined by query_code.

  • success: function (Optional)

    Function to be executed when SQL has been executed successfully. Function receives following parameters:

    * data: It is a map with returned objects by sentence on JSON format, where the key of each attribute is related with resultSet alias created by the execution of SQL sentence.

    It is also possible to obtain data of the object through data.get("index") function.

  • error: function (Optional)

    Function executed when SQL Sentence can't be executed. Function receives following parameters:

    * errmsg: Mensaje de error.

Returns:

  • Object[]

    Returned objects by sentence on JSON format, where the key of each attribute is related with resultSet alias created by the execution of SQL sentence. If sentence doesn't return any register, function will return null.

Since:

  • 14/04/2016

executeQueryValue (query_code, params, success, error) : string/number

Executes an SQL Sentence defined on the actual object. All parameters are received as Javascript objects (string, number, Date, ...) Result of the Sentence can be returned with a single register.

Parameters:

  • query_code: string

    Identifier of SQL sentence to be executed. Each sentence has to be defined before on wic_jrep_form_query table for the actual object.

  • params: Object[] (Optional)

    Execution parameters of the query that will be replaced by '?' characters of the query. These parameters have to be defined before on wic_jrep_form_query_field table to actual object and query defined by query_code.

  • success: function (Optional)

    Function executed in case that SQL sentence couldn't be executed. Function receives following parameters:

    * data: Returned objects by sentence on JSON format, where the key of each attribute is related with resultSet alias created by the execution of SQL sentence.

    It is also possible to obtain object data through data.get("index") function.

  • error: function (Optional)

    Function executed in case that SQL sentence couldn't be executed. Function receives following parameters:

    * errmsg: Error message.

Returns:

  • string/number

    Returned value by SQL sentence.

Since:

  • 14/04/2016

executeQueryValues (query_code, params, success, error) : Object[]

Executes an SQL sentence defined before on the actual object. Parameters have always been received as Javascript objects (string, number, Date, ...) Sentence result can return a single register.

Parameters:

  • query_code: string

    SQL identifier to be executed. Each sentence has to be defined before on wic_jrep_form_query for the actual object.

  • params: Object[] (Optional)

    Execution parameters of the query, that will be replaced by '?' characters. These parameters have to be defined before on wic_jrep_form_query_field table for actual object and the query defined by query_code.

  • success: function (Optional)

    Function executed in case that SQL sentence couldn't be executed. Function receives following parameters:

    * data: It is a map with returned objects by sentence on JSON format, where the key of each attribute is related with resultSet alias created by the execution of SQL sentence.

    It is also possible to obtain data of the object through data.get("index") function.

  • error: function (Optional)

    Function executed in case that SQL sentence couldn't be executed. Function receives following parameters:

    * errmsg: Error message.

Returns:

  • Object[]

    Array with returned objects by sentence on JSON format, where the key of each attribute is related with resultSet alias created by the execution of SQL sentence.

Since:

  • 14/04/2016

executeReload (mandatory)

Allows to force cursor loading. Function forces execution of SQL sentence of the object.

Parameters:

  • mandatory: boolean (Optional)

    Allows to indicate if confirmation reload message can be omitted.

    -true, doesn't need reload confirmation.

    -false, needs confirmation.

    Default value: true.

Since:

  • 11/02/2015

executeReset ()

Allows to force form reset if user has all needed permissions.

Since:

  • 11/01/2015

executeSelectObservableEvent (p_boxid, p_records)

Fires select event on an observable box. (Observable box has to support it event)

Settings Parameters:

  • p_boxid: string or number

    Observable box Id or memotecnic

  • p_records

    Array JSON with the records used to refresh the observer box.

Example:

Copy
executeSelectObservableEvent ("BOX_SQLTABLE", [{ id:1 },{ id:2 },{ id:3 },{ id:4 }])
executeUpdate ()

Allows to force form modification when user has all needed permissions.

Since:

  • 11/02/2017

getBoxID (nmemo) : number

Obtains a single database identifier for a form box (boxid) through nmemotechnical code of the box.

Parameters:

  • nmemo: string

    Nmemotechnical code of the box.

Returns:

  • number

    A single identifier of the box related with nemotechnical received.

getBoxSelection (p_boxid) : Object[]

Obtains the selection of a box with all selectable data. It is only applicable to boxes of SQL-IMGLIST, SQL-TABLE, SQL-TREE, SQL-BLOB types.

Parameters:

  • p_boxid: string/number

    It can be either nemotechnical of (boxcode) box or intern identifier of (boxid) database.

Returns:

  • Object[]

    Array with selected data.

getCurrent () : string

Obtains data and current time, depending on the defined timetable of the system for connection user.

Returns:

  • string

    Date and actual time.

getCurrentRowIndex () : integer

Obtains the row which is being edited.

Deprecated:

  • 01/10/2016

Returns:

  • integer

    Row Index which is being edited. First row is number 0. Returns -1 in case of not being any edition row.

getDbms () : string

Obtains current data base.

Returns:

  • string

    Data base code.

getDict () : string

Obtains dictionary whom object has been defined as a last resort; depending on dictionaries priority order defined by current data base.

Returns:

  • string

    Dictionary code where object has been defined.

getFieldByName (fieldName) : domEl

Obtains form field identified by indicated name.

Parameters:

  • fieldName: string

    Field section.

Returns:

  • domEl

    Form field identified by indicated name.

getFieldChanged (fieldName) : boolean

Determines if a field has been identified from last transaction or form load.

Parameters:

  • fieldName: string

    Field name.

Returns:

  • boolean

    -true if field value had any modification.

    -false on the opposite way.

getFieldError (fieldName) : string

Obtains error message of a field.

Parameters:

  • fieldName: string

    Name of the field where error message will be obtained.

Returns:

  • string

    Error message that affects the field. In case that field doesn't have any error, it will be null.

getFieldIsAnArray (field) : boolean

Determines if it exists more than one field on the form with same name.

Parameters:

  • field: domEl/domEl[]

    Field or array of fields from the form.

Returns:

  • boolean

    -true if it exists more than one field on the form with same name.

    -false on the opposite way.

getFieldValue (fieldName, withoutAlert) : string/number

Obtains value of a field from a form.

Parameters:

  • fieldName: string

    Field name.

  • withoutAlert: boolean (Optional)

    Indicates if it is needed to communicate an error in case of not finding any field on the form by an indicated name.

Returns:

  • string/number

    Field value. In case of not find the field, it will be null.

Example:

Copy
getFieldValue("ts_cloud_preventive_lines.preventive_lines_cabid");
getFirstArrayElement (data) : string

Obtains first element of an array. When user obtains multiples results of a query, hastable values are strings arrays. This method allows to obtain the first of elements.

Parameters:

  • data: array

    Array of data whom user will obtain the first element.

Returns:

  • string

    First element of the array. In case that parameter received is not an array, it will return same parameter.

getGlobalNumber (tabname, colname) : number

Recovers a variable of a group of global variables.

Parameters:

  • tabname: string

    Table names which identifies sensitive fields to be assigned with a value.

  • colname: string

    Name of the defined column on exit columns of the father questionnaire.

Returns:

  • number

    Variable of a global variables group.

getGlobalObject (tabname, colname) : Object[]

Recovers a variable of a group of global variables. It will be a string or an array javascript:

Parameters:

  • tabname: string

    Table names which identifies sensitive fields to be assigned with a value.

  • colname: string

    Column name defined on output columns of the father form.

Returns:

  • Object[]

    Variable of a global variables group.

getGlobalString (tabname, colname) : string

Recovers a variable of a group of global variables.

Parameters:

  • tabname: string

    Table names which identifies sensitive fields to be assigned with a value.

  • colname: string

    Column name defined on output columns of the father form.

Returns:

  • string

    Variable of a global variables group.

getLabelMessage (code, defmsg, param3, param4,..., paramN) : string

Obtains a defined tag on data base dictionary for user language. In case of not finding a tab, it returns the text by default. If any text has been defined by default, it returns código_de_idioma.código_etiqueta; for example EN.LBL_NAME

Content tag can have dinamically references, through {i} syntax. Where {0}, {1}, ..., {n} references will be replaced by corresponding parameters that recive function through third parameter.

For this reason, a message of type:

The value must be defined between {0} and {1}".

Considering a call as following case:

getLabelMessage("LBL_RANG", "Default message...", 1, 8);

It will return:

"The value must be defined between 1 and 8".

Parameters:

  • code: string

    Tag code.

  • defmsg: string (Optional)

    Message by default to be returned in case of not finding the tag for user language.

  • param3,param4,...,paramN: string (Optional)

    Arguments to be replaced by message if references {0}, {1}, ..., {N} are used.

Returns:

  • string

    Defined tag on actual database dictionary to language user or, default text.

getParentCode () : string

Obtains an object code of the father form.

Returns:

  • string

    Object code of the father form.

Since:

  • 29/12/2016

getParentFieldValue (colname) : string

Obtains the value of the father column form. That is to say, form is located above actual form. Returned value is always a string.

Parameters:

  • colname: string

    Column name defined on output columns of the father form.

Returns:

  • string

    Column value of the father form.

Since:

  • 29/12/2016

getParentSubmitValue (colname) : Object[]

Obtains value of a column form father. That is to say, the form which is located above actual form. Returned value is always a Javascript object.

Parameters:

  • colname: string

    Column name defined on output columns of the father form.

Returns:

  • Object[]

    Column value of the father form.

Since:

  • 29/12/2016

getQueryCond (excludevars) : Object[]

Obtains sql condition used to make the cursor.

Parameters:

  • excludevars: boolean

    Flag indicating the condition must no contain variables

Returns:

  • string

    Condition

Since:

  • 05/07/2018

getQueryValue (sql, doNotUseCache, callback, errcallback, scope) : map

Executes an SQL Sentence based on current data base. Sentence result has to return an only register. All data have always been located for the user, this means that all data are on legible format and numbers can include decimal markers.

Deprecated:

  • 14/04/2016

    Instead of that, use functions executeAsyncQueryValue or executeQueryValue.

Parameters:

  • sql: string

    SQL/XML Sentence to be executed against current database.

  • doNotUseCache: boolean (Optional)

    Indicates if the Sentence is executed on cache.

    -true Sentence is not obtained as cache and it has always access to database.

    -false Conversely, when Sentence is executed, next calls will obtain the result from the cache.

    Value by default: false

  • callback: function (Optional)

    Function executed in case of not being executed successfully the SQL Sentence. Function receives following parameters:

    * qryvalue: Value returned by SQL Sentence.

  • errcallback: function (Optional)

    Function executed in case that SQL Sentence has been executed successfully. Function receives following parameters:

    * errmsg: Error message.

    * errtrace (Optional): Trace error.

    * errtype (Optional): Identification code of error type.

    * errstmt (Optional): Sentence which has caused the error.

  • scope: function (Optional)

    Field with callback functions and errcallback.

Returns:

  • map

    It returns map execution, where the key is the name of the column and the value is the date which is corresponds with the column.

Example:

Copy
getQueryValue(
                        "SELECT NVL(MAX(corrective_lines_orden),0) orden FROM ts_cloud_corrective_lines " +
                        "WHERE corrective_lines_cabid = " + m_cabid, true // not-cached
                        );
getQueryValues (sql, doNotUseCache, allowMultipleRows, callback, errcallback, scope) : map/map[]

Executes an SQL Sentence based on current data base. Sentence result has to return an only register. All data have always been located for the user, this means that all data are on legible format and numbers can include decimal markers.

Deprecated:

  • 14/04/2016

    Instead of that, use functions executeAsyncQueryValues or executeQueryValues.

Parameters:

  • sql: string

    SQL/XML Sentence to be executed against current database.

  • doNotUseCache: boolean (Optional)

    Indicates if Sentence is executed on cache.

    -true, Sentence is not obtained as cache and it has always access to database.

    -false Conversely, when Sentence is executed, next calls will obtain the result from the cache.

    Value by default: false

  • allowMultipleRows: boolean (Optional)

    Indicates if execution result can return more than one register.

    Value by default: false

  • callback: function (Optional)

    Function executed in case of not being executed successfully the SQL Sentence. Function receives following parameters:

    * qryvalue: Returned value for SQL Sentence.

  • errcallback: function (Optional)

    Function executed in case that SQL Sentence has been executed successfully. Function receives following parameters:

    * errmsg: Error Message.

    * errtrace (Optional): Trace error.

    * errtype (Optional): Identification code of error type.

    * errstmt (Optional): Sentence which has caused the error.

  • scope: function (Optional)

    Field of callback and errcallback functions.

Returns:

  • map/map[]

    Returns all results of map execution, where the key is the name of the column and the value is the date which is corresponds with the column. In case of not indicate that function can return multiple registers, function result is an array.

Example:

Copy
getQueryValues("SELECT cop_producto.titesp, cop_producto.tipcen, cop_producto.codcen, 
                gcentros.nombre " + "  FROM cop_producto, gcentros " +
                                    " WHERE cop_producto.idprod = " + field.value +
                                    "   AND cop_producto.tipcen = gcentros.tipcen " +
                                    "   AND cop_producto.codcen = gcentros.codigo "
);
getRepCode () : string

Obtains object code of the form.

Returns:

  • string

    Object code

getRealRepCode () : string

Obtains object code of the form. In case of being an alias, it returns the code of original object. All alias are tags that allow access to an object with a different name as the original; defined through wic_jrep_object_alias maintenance

.

Returns:

  • string

    Object Code

getSubmitValue (fieldName) : Object[]

Obtains value of a field form with necessary format in order to send to the server. This, returns a Javascript object instead of a text chain located for user. This function is useless for calls functions like executeQueryValue.

Parameters:

  • fieldName: string

    Field name.

Returns:

  • Object[]

    Field value. In case of not find the field, it returns null.

getTime () : string

Obtains actual time, according to the schedule system for connection user.

Returns:

  • Actual Time.

getToday () : string

Obtains current date, depending on schedule system defined for connection user.

Returns:

  • string

    Actual date.

getTransactionSize () : integer

Obtains transaction size, this means, number of editable rows on a multirow form.

Returns:

  • integer

    Number of editable rows of the form.

getUser () : string

Obtains Axional Studio user.

Returns:

  • string

    Code Axional Studio user.

getVariableValue (varname) : Object[]

Obtains value of a form variable.

Parameters:

  • varname: string

    Variable name.

Returns:

  • Object[]

    Name value of a form variable, based on a parameter.

Since:

  • 29/12/2016

hasFieldMultipleSelection (fieldName) : boolean

Determines if a field allows to select multiples values through (SoftReferences) references window. On this case, when registers are being selected, values are being added divided by '|'.

Parameters:

  • fieldName: string

    Field name whom it will know if multiple selection has been accepted.

Returns:

  • boolean

    -true if the field accepts multiple selection.

    -false if not.

hasTransactions () : boolean

Determines if a form has available transactions (insertion, modification or erasing). If there aren't transactions, inputs are not emitted, and for this reason, can't be accessed functions as getFieldValue, setFieldValue, etc.

Returns:

  • boolean

    -true if the form has any available insertion transactions, modification or erasing.

    -false if not.

Example:

Copy
if (!hasTransactions()){
    return false;
}
Hashtable ()

This structure was used from tags to global variables generation. This parameterization is done through wic_jrep_form_globals maintenance.

Deprecated:

  • Function by compatibility of wic is maintained with two surroundings Jetty and Tomcat.

insertRequiresReset ()

Forces user to execute form reset before insertion.

isFieldDate (fieldName) : boolean

Determines if a field is a date type.

Parameters:

  • fieldName: string

    Field name.

Returns:

  • boolean

    -true if field is a date type.

    -false if not.

isFieldNumeric (fieldName) : boolean

Determines if a field is a numeric type.

Parameters:

  • fieldName: string

    Field name.

Returns:

  • boolean

    -true if a field is a numeric type.

    -false if not.

isJavascriptConsoleActive () : boolean

Determines if Javascript console of user is available.

Returns:

  • boolean

    -true if the console is available.

    -false if not.

isMultiRow () : boolean

It determines if the form accepts multiples registers.

Returns:

  • boolean

    -true if it is a form with multiple registers.

    -false if the form shows one register.

isOnCompatibility () : boolean

This function is temporary and is used during system migration to Jetty, Java8, Jersey, etc.

Returns:

  • boolean

    -true if the system is compatible with Jetty, Java8, Jersey, etc.

    -false if not.

isOnInsert () : boolean

Determines if a form is ready to realize the insertion. It only has sense the question and it has used the isOnUpdate negation.

Returns:

  • boolean

    -true form reset is executed and ready for insertion.

    -false if not.

isOnUpdate () : boolean

Determines if a form is ready to realize the modification. It only happens when the form has modification permits and a reset has not been made.

Returns:

  • boolean

    -true form is ready in order to make a modification.

    -false if not.

isOutputColumn (colname) : boolean

Determines if a column belongs to a form.

Parameters:

  • colname: string

    Column name.

Returns:

  • boolean

    -true if a column is included on input fields of the form.

    -false if not.

Since:

  • 27/12/2016

isReadOnly () : boolean

Determines if a form is a reading type. It means that insertion transaction and modification are not available. On a reading type form, inputs not emitted, can't be accessed by getFieldValue, setFieldValue functions.

Returns:

  • boolean

    -true if the form has some insertion/modification transactions available or if it has unconditional input sign.

    -falseif not.

isRowSelected () : boolean

Determines if there is any selected register on the form.

Returns:

  • boolean

    -true if there is a selected register on the form.

    -false if not.

Since:

  • 29/12/2016

JSQL_disableCheck (name)

Disables Javascript check of a data base restriction (CHECK CONSTRAINT) of the main table form. Deactivation is only done by form level, if transaction is finished and the restriction is not done, database will show the error. This function allows to delegate, the modification of some value register in order to achieve the restriction to triggers of database.

Parameters:

  • name: string

    Restriction name to be deactivated.

JSQL_disableDelete (reason)

Disables erased transactions of the form.

Parameters:

  • reason: string

    Reason to deactivate the functionality. This data is informative and provides information when user consults object transactions situation.

JSQL_disableInsert (reason)

Disables insert transactions of the form.

Parameters:

  • reason: string

    Reason to deactivate the functionality. This data is informative and provides information when user consults object transactions situation.

JSQL_disableReset (reason)

Disables reset transactions of the form.

Parameters:

  • reason: string

    Reason to deactivate the functionality. This data is informative and provides information when user consults the object transactions situation.

JSQL_disableSingleRowSelection ()

Allows to deactivate dynamically, after the insertion of a register, new register will be fixed as unique element of the cursor. This is useful for headboard but not for lines.

JSQL_disableUpdate (reason)

Disables modification transactions of the form.

Parameters:

  • reason: string

    Reason to deactivate this function. This data is informative and provides information when user consults object transactions situation.

JSQL_disableVerifyExist (fieldName)

Deactivate hard existense verification.

Deprecated:

  • 03/02/2014

    Use function setFieldExistDisableVerify instead.

Parameters:

  • fieldName: string

    Field name.

Example:

Copy
JSQL_disableVerifyExist("gcompedl.udmpre");
JSQL_enableUnconditionalInput ()

Allows the existence of editable fields on a form without insertion transactions nor modification. For example, line selectorstoFile.

Deprecated:

  • 28/12/2016

    This function is not supported by the system.

JSQL_enableVerifyExist (fieldName)

Activates hard existence verification.

Deprecated:

  • 03/02/2014

    Instead use function setFieldExistDisableVerify.

Parameters:

  • fieldName: string

    Field name.

Example:

Copy
JSQL_enableVerifyExist("gcompedl.udmpre");
JSQL_execute_StatementAndRefresh (cmd, cmd_crc, args)

Executes an SQL/XML Sentence and recharges form after its execution. Moreover, it forces main Sentence object to be executed again. For this reason, it is possible to update form data in case that sent result Sentence can modify them.

Deprecated:

  • 14/04/2016

    Because of security reasons, this function cannot be executed.

Parameters:

  • cmd: string

    SQL or XML Sentence to be executed against actual database.

  • cmd_crc: string

    CRC Code of actual register to verify data integrity. This is a code composed by MD5 of register content, which allows to verify that register content hasn't been changed from last load of the form.

  • args: string[] (Optional)

    Arguments list which is sent in case that sentence has references to entry parameters through '?' character.

JSQL_getMessage (code)

Obtains tag defined on dictionaries of actual database for user language.

Deprecated:

  • 01/10/2016

    This function can't be used again. It is needed to use getLabelMessage function.

Parameters:

  • code: string

    Tag code.

JSQL_MakeXSQLScriptCall (scriptname, arg1, arg2, ..., argN)

Obtains necessary syntax in order to make a call to XSQL-Script through some function as getQueryValue or getQueryValues.

Deprecated:

  • 14/04/2016

    Instead of that, use functions as executeAsyncQueryValue, executeAsyncQueryValues, executeQueryValue o executeQueryValues.

Parameters:

  • scriptname: string

    Process name XSQL-Script to be executed.

  • arg1,arg2,...,argN: Object(optional)

    Received parameters after the name, are sent as arguments to XSQL-Script process.

Example:

Copy
JSQL_MakeXSQLScriptCall("gcompedl_js_getinfo", m_gcompedh_cabid, m_linid);
numberRoundDecimal (num, dec) : number

It rounds a decimal value with indicated precision.

Parameters:

  • num: number

    Value to be rounded.

  • dec: number

    Precision.

Returns:

  • number

    Rounded value.

Since:

  • 14/12/2016

openModalFields (title, message, fields, buttons, callback)

The openModalFields is a pre-defined function used by a user program that allows to show a modal window with messages and/or form fields and execute a callback function on click accept button.

This function expects 5 params openModalFields (title, message, fields, buttons, callback).

Parameters:

  • title: string

    Title name of modal window.

  • message: string (Optional)

    Simple paragraph on body modal window.

  • fields: JSONObject[] (Optional)

    List of form fields.

    • name: Internal value to identify the type.

    • label: Text to show as label.

    • type: field type

      • 0: Text

      • 1: TextArea

      • 2: Integer

      • 3: Decimal

      • 4: Date

      • 5: Datetime

      • 6: Checkbox

      • 7: Select

    • decimalPrecision: decimal precision of number (In case of decimal)

    • value: Initial value

    • trueVal: true value (In case of checkBox)

    • falseVal: false value (In case of checkBox)

    • values: list of a select. JSONObject[] [{code:.... , label:....] (In case of Select)

    • sref_tabname: Soft References table name (In case of Select with autocomplete)

    • sref_method: Soft References method (In case of Select with autocomplete)

  • buttons: JSONObject[] (Optional) (Since: 02/05/2019)

    Add customized buttons. List of buttons fields:

    • text: Text of button.

    • click: Function to execute when click the button. (Is possible use this.close() to close the Window)

    • colortype:

      List of values:

      • W: Warning.

      • A: Alert.

      • C: Confirm.

      • I: Info.

  • callback: function

    Function to execute when click on Accept button.

Since:

  • 19/06/2018

Example:

Copy
openModalFields(
 	"Title", 
 	"", 
 	[
 		{
 			"name": "Zero",
 			"label": "LABEL_TEXT",
 			"type": 0,
 			"value": "Hello World!"
 		},
 		{
 			"name": "One",
 			"label": "LABEL_TEXTAREA",
 			"type": 1,
 			"value": "Lorem ipsum dolor sit amet, ...."
 		}, 
 		{
 			"name": "Two",
 			"label": "LABEL_INTEGER",
 			"type": 2,
 			"value": 25
 		},
 		{
 			"name": "Three",
 			"label": "LABEL_DECIMAL",
 			"type": 3,
 			"decimalPrecision": 3,
 			"value": 25.12
 		},
 		{
 			"name": "Four",
 			"label": "LABEL_DATE",
 			"type": 4,
 			"value": "2018-06-15"
 		},
 		{
 			"name": "Five",
 			"label": "LABEL_DATETIME",
 			"type": 5,
 			"value": "2018-06-15"
 		},
 		{
 			"name": "Six",
 			"label": "LABEL_CHECKBOX",
 			"type": 6,
 			"value": 1,
 			"trueVal": 1, 
 			"falseVal" : 0,
 		},
 		{
 			"name": "Seven",
 			"label": "LABEL_SELECT",
 			"type": 7,
 			"value": "it",
 			"values" : [
 				{value : "de", label : "Germany"},
 				{value : "fr", label : "France"},
 				{value : "uk", label : "United Kingdom"},
 				{value : "it", label : "Italy"},
 				{value : "es", label : "Spain"}
 			]
 		}
 	], 
 	null,
 	function() { alert("HELLO CALLBACK FUNCTION"); }
 );
openModalFormauto(title, rep_code, cond, vars, closecallback, allowDetach)

The openModalFormauto function allows to show a modal window with title and the iframe of object.

This function expects 6 params openModalFormauto (title, rep_code, cond, vars, closecallback, allowDetach).

Parameters:
  • title: string

    Title name of modal window.

  • rep_code: string

    Object code.

  • cond: string

    Filter condition.

  • vars: JSONObject (Optional)

    JSON object with variable names as the object keys and variable values as the object values.

  • closecallback: function

    Function to execute on close modal.

  • allowDetach: boolean

    Allow detach button.

Since:

  • 19/06/2018

Example:

Copy
openModalFormauto(
                         	"Hello World!", 
                         	"studio_link_form_withvars",  
                         	"1=1",
                            { 
                                "INTVAR1": 25,
                                "DECVAR1": 1.2,
                                "DATEVAR1": "25-05-2018",
                                "DATETIMEVAR1": new Date()
                            },
                            function() { console.log("OK") },
                            false
                         );
playErrorSound ()

Emits an error sound.

setBoxVisible (p_boxid, visible)

Shows/Hides out a box of the form.

Parameters:

  • p_boxid: string/number

    It can be nmeotecnic box code (boxcode) or the internal identifier of (boxid) database.

  • visible: boolean (Optional)

    -true where box is shown.

    -false where box is hide out.

    Value by default: true.

setBoxesVisible (boxes)

Shows/hides out a group of boxes. These have not belong to same datablock or grupo.

Parameters:

  • boxes: JSONObject

    Structure which contains boxes and the visibility of each. This structure is { boxid: visible, ... }, where:

    boxid: It can be nmeotecnic box code (boxcode) or the internal identifier of (boxid) database.

    visible: -true where box is showed. -false box is hide out.

setButtonBoxDisabled (p_boxid, btnpos, disabled)

Allows to disable/enable a button of a box from the form when it is not hided out or disabled by hide out/activation expressions on button definition.

Parameters:

  • p_boxid: string/number

    It can be nmeotecnic box code (boxcode) or the internal identifier of (boxid) database.

  • btnpos: integer

    Button position, with box identifier, determines the button which is going to be disabled/enabled.

  • btnpos: integer (Optional)

    -true where button is disabled.

    -false where button is enabled.

    Value by default: true.

setButtonDisabled (btnpos, disabled)

Allows to disable/enable a button of a box from the form when it is not hided out or disabled by hide out/activation expressions on button definition.

Parameters:

  • btnpos: integer

    Button position, with box identifier, determines the button which is going to be disabled/enabled.

  • btnpos: integer (Optional)

    -true where button is disabled.

    -false where button is enabled.

    Value by default: true.

setCurrentRowIndex (rowindex)

Activates the file indicated for edition. This function can be only used with multirow forms.

Deprecated:

  • 01/10/2016

    This function can't be used again. There is not an alternative function as it is impossible to add field events on multirow forms.

Parameters:

  • rowindex: integer

    Row index which is going to be editable. First row is number 0.

setDatablockVisible (blockID, visible)

Shows/Hides out a full datablock. This is a box a group of boxes of the form located on same cell.

Parameters:

  • blockID: number

    Block identifier. This is related with block position on the form.

  • visible: boolean (Optional)

    -true it is showed on boxes block.

    -false it is hided out on boxes block.

    Value by default: true.

setFieldChanged (fieldName, changed, execute)

Allows to force modified state on a field. When a field is modified, by manuall o programm mode, this is marcked as modified. For this reason, before doing a transaction, a group of series is executed (is needed to prove the integrity, execution onChange event, etc.). Through this function, is possible to change modified indicator in order to emit or force execution of these actions.

Parameters:

  • fieldName: string

    Field name.

  • changed: boolean

    -trueit is marked as modified and specific actions will be executed.

    -false it is marked as no modified.

  • execute: boolean (Optional)

    -true field change event is executed.

    -false field change event is not executed.

Example:

Copy
setFieldChanged("inf_pedidos.tercer", true);
setFieldError (field, error, isFormatingError)

It marks a field with indicated error. When a field with an error is marked, its style changes and it doesn't allow to move forward subsequent fields of the form. It also disables the possibility of inserting or modifying the register.

Parameters:

  • field: domEl

    Field form which is marked with a mistake.

  • error: string

    Error message of the field.

  • isFormatingError: boolean (Optional)

    -true if an error becomes from a format problem.

    -false on the other hand.

    Value by default: false.

Example:

Copy
setFieldError(field," It can't be inserted dates before as" + (anoest -1) + ".", true);
setFieldExistAllowMultipleRows (fieldName, allowmr)

For a field related with integration, determine that on the object and for SQL Condition defined, can exist more than one register with indicated value on the field. Conversely, in case of being this situation, field will be marked with the mistake.

Parameters:

  • fieldName: string

    Field name.

  • allowmr: boolean (Optional)

    -true integration allows multiples registers with same identifier.

    -false it can be only a register for indicated code.

Example:

Copy
setFieldExistAllowMultipleRows(field.name);
setFieldExistDisableVerify (fieldName, disable)

For a field related with integration, is needed to define if it is necessary integration with destination object. Otherwise, integrity relation is used to choose a possible value, but no defined values can be used on the destination object.

Parameters:

  • fieldName: string

    Field name.

  • disable: boolean

    -true integration relation becomes no restrictiva and allows to use non exist value on destination.

    -false relation is restrictiva.

setFieldExistValues (fieldName, objdest, coldest, qrycond, noCache)

Modifies integrity references of a field. Usually, integrity references are defined by a foreign key existence (Hard Reference), or they are defined through integrity relation wic_jdic_collist (Soft References) maintenance. This function allows to define (Dynamic References) dinamic relations, managed by programm way. Query, defines possible values that can adopt current field. The object indicaded has to be defined in some of the dictionaries of actual database.

Parameters:

  • fieldName: string

    Field name.

  • objdest: string

    Target object of the referendum. Indicates the SQL object that, together with the query condition, defines the possible values that the current field can adopt. The object indicated here must be defined in one of the dictionaries of the current database.

  • coldest: string

    Name of the column that contains the possible values that the field may adopt.

  • qrycond: string

    SQL condition that, together with the SQL clause of the destination object, delimits the number of valid records.

  • noCache: boolean (Optional)

    -true each query is executed in the database.

    -false the SQL query runs in cache.

    Default value: false.

Example:

Copy
cond = "cop_partidas.codcon =" + getFieldValue("cop_amorestl.concep");
setFieldExistValues("cop_amorestl.codpar", "cop_partidas", "codpar", cond);
setFieldFocus (fieldName)

Locate the cursor in the indicated field.

Parameters:

  • fieldName: string

    Field Name.

setFieldNoentry (fieldName, noEntry)

It allows to indicate if a field is editable or not. An editable field allows you to change its value manually using the corresponding form field. Otherwise, the field can not be modified manually, although it is possible to change its value via program.

Parameters:

  • fieldName: string

    Field Name.

  • noEntry: boolean (Optional)

    -true the field becomes read-only and, therefore, can not be modified manually.

    -false the field is editable.

    Default value: true.

Example:

Copy
setFieldNoentry(wic_ldap_authenticators.connection_name, true);
setFieldNullable (fieldName, isNullable)

It allows to indicate if a field is required or not. A required field for which no value has been assigned, prevents both placing the focus in subsequent fields of the form assigning any value to it, as well as performing insertion and modification transactions.

Parameters:

  • fieldName: string

    Field name.

  • isNullable: boolean

    -true the field becomes not required and, therefore, it is not necessary to assign any value to it.

    -false the field is required and the system does not allow to leave it blank.

    Default value: true.

Example:

Copy
setFieldNullable('agc_terceros.nombre',true);
setFieldPreserveOnClear (fieldName)

Indicates that the field should not be affected by the reset.

Parameters:

  • fieldName: string

    Field name.

setFieldValue (fieldName, fieldValue, noVerifyExistNeed)

Sets the value of a form field.

Parameters:

  • fieldName: string

    Field name

  • fieldValue: string/number

    In general, it always receives a String, but for the numeric, either a String formatted in the user's format is sent, or a Number is sent (it is formatted for the user). It is an error to send a String formatted as a javascript number.

  • noVerifyExistNeed: boolean (Optional)

    In the case of a field with integrity reference (SoftReference), it indicates whether the integrity of the defined value is checked.

    -true integrity is not checked.

    -false it is checked

    Default value: true.

Example:

Copy
m_orden = (1 * m_orden + 2);
setFieldValue("ts_cloud_corrective_lines.corrective_lines_orden", m_orden, true);
setFieldValues (tabname, map)

Make a massive assignment of values to fields of the form from a table and a data structure.

Parameters:

  • tabname: string

    Name of the table that identifies the fields that are likely to be assigned a value.

  • map: map

    Data structure that contains as key the name of the column and as the value the data to assign.

setFieldVisible (fieldName, visible)

It allows hiding / displaying a field dynamically. In case the field has a label (label) it is also affected by the visibility of the field.

Parameters:

  • fieldName: string

    Field name.

  • visible: boolean(optional)

    -true both field and label is displayed.

    -false field and label is hidden.

setFixedValue (fieldName)

Sets the value of a field. A field can have a fixed value because it comes from a selection or from a href.

Parameters:

  • fieldName: string

    Field name.

setGlobal (tabname, tabdata)

Install a set of global variables.

Parameters:

  • tabname: string

    Name of the table that identifies the fields that are likely to be assigned a value.

setInsertRequiresReset ()

Forces the user to execute the form reset before inserting.

Deprecated:

  • 03/02/2014

    Use the insertRequiresReset function instead.

setTransactionSize (size)

Indicates the row size of the insert transaction.

Parameters:

  • size: number

    Size or number of rows, of the insert transaction.

showErrorDialog (errOpts)

Displays a dialog screen with the detail of an error.

Parameters:

  • errOpts: JSONObject

    Structure that contains the detail of the error to be displayed. The following shows the parameters that the structure must contain:

    * errmsg: Error message.

    * errstat (Optional): Error status.

    * errtrace (Optional): Trace of the error.

    * errtype (Optional): Identification code of the types of error.

    * errstmt (Optional): Sentience that caused the error.

sqldotSetData (p_boxid, data)

Indicates the row size of the insert transaction.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • data: string

    Text string in DOT format with which the graphic will be updated.

sqlocrAddCreateEvent (p_boxid, callback, scope)

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • callback: function (Optional)

    Function to execute when the event is triggered.

  • scope: function (Optional)

    Scope of the callback and errcallback functions.

sqlocrClearHighlight (p_boxid)

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

sqlocrDisableMouseSelect (p_boxid)

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

sqlocrEnableMouseSelect (p_boxid, detach)

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

sqlocrGetPage (p_boxid)

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

sqlocrSetPage (p_boxid, numpage, callback, scope)

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • numpage: number

  • callback: function

    Function that is executed in case the SQL Sentience has been executed successfully. The function receives the following parameters:

    * qryvalue: Value returned by the SQL Sentience.

  • scope: function (Optional)

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

sqlocrTextHighlight (p_boxid, regex, group, offsetRows, offsetCols, nRows, nCols)

Mark a text portion of a text column of the Blob object.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • regex:

  • group:

  • offsetRows:

  • offsetCols:

  • nRows: number

    Number of rows.

  • nCols: number

    Number of columns.

sqltableAddEvent (p_boxid, evtname, callback)

Add an event to the table. It allows to indicate the execution of a function when a certain event is triggered. The events contemplated are:

# onload: It runs every time the table is loaded.

# before_insert (rowid): It is executed before inserting a new row. If the function of the event returns false, the insertion of the row is foreseen.

# after_insert (rowid): Run after the row has been inserted successfully.

# before_update (rowid): It is executed before modifying a row. If the function of the event returns false the modification of the row is foreseen.

# after_update (rowid): Run after the row has been modified successfully.

# after_delete (rowid): Run after the row has been deleted successfully.

# row_deselect (rowid): It runs the moment a row is unchecked as selected.

# row_select (rowid): It is executed at the moment a row is marked as selected.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • evtname: string

    Name of the event for which you want to add the function.

  • callback: function

    Function to execute when the event is triggered.

sqltableAddFieldEvent (p_boxid, colname, evtname, callback)

Add a column event. It allows to indicate the execution of a function when a certain event is triggered. The events contemplated are:

# before (field): It is executed when the field receives the focus.

# after (field): It is executed when the field is exited, if the value has been modified.

# input (field):It is executed every time the value is modified.

# blur (field): It is executed when leaving the field.

# validate (field): It is executed when modifying the field. It allows to call the function sqltableSetFieldError to perform validations of customized data.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • colname: string

    Name of the column on which the event applies.

  • evtname: string

    Name of the event for which you want to add the function.

  • callback: function

    Function to execute when the event is triggered.

sqltableAddRow (p_boxid)

Add a line to the SQL table dynamically. The new line will be blank, only with the default values defined. The line will remain in edit mode and the cursor will be placed in the first editable field. In case of being a transactional table, the insertion in the database is not performed. It will save changes to the line via the save button or the ENTER key.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

sqltableClear (p_boxid)

Delete all the contents of a SQL table. Deletion is only done locally, it does not affect the content of the database.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

sqltableGetByID (p_boxid) : domEl

Get a SQL table of the form.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

Return:

  • domEl

    HTML element that represents the SQL table.

sqltableGetFieldValue (p_boxid, colname, rowid) : string

Gets the value of a cell in the SQL table.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • colname: string

    Name of the column from which you want to retrieve the value.

  • rowid: number (Optional)

    Number of the row from which you want to retrieve the value. If a row number is not indicated, it obtains the value of the row that is in edition mode.

Return:

  • string

    Value of the row and column indicated.

sqltableGetSelected (p_boxid) : JSONObject[]

Gets the data of the selected rows in a SQL table.

Deprecated:

  • 23/07/2018

    Instead of that, use function getBoxSelection.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

Return:

  • JSONObject[]

    Array with the selected rows; Each record in the array is a JSON structure in which the key is the column name and the value is the corresponding data in the SQL table.

sqltableRefresh (p_boxid)

Reloads the contents of the SQL table. To do this, rerun the SQL set against the server asynchronously.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

sqltableSearchBy (p_boxid, colexpr, callback) : boolean

Reloads the contents of the SQL table. To do this, rerun the SQL set against the server asynchronously.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • colexpr: Object

    Object of column expression as { 'colname1' : 'expr', 'colname2' : 'expr', ..., 'colnameN' : 'expr' }

  • callback: Function (Optional)

    Function to execute after performing the search.

Return:

  • boolean

    This function could be executed from the onclick event of an HTML link. You must return false to avoid opening an empty tab when you click on the link.

Example:

Copy
sqltableSearchBy("CLIPOT", {
                'cliente': getFieldValue('virtualtable.cliente'), 
                'articulo': getFieldValue('virtualtable.articulo')
});
sqltableSelRow (p_boxid, rowid)

Select a row from the SQL table.

Deprecated:

  • 08/10/2014

    Use the sqltableToggleRowSelection function instead.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • rowid: number

    Number of the row to select.

sqltableSetFieldError (p_boxid, colname, errmsg, rowid)

It allows to define the error of a field of a row of the SQL table. Antención, this function can only be called from the event validate of the field, which can be defined by the function sqltableAddFieldEvent.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • colname: string

    Name of the column on which you want to change the value.

  • errmsg: string

    Error message.

  • rowid: number (Optional)

    Number of the row to which the field will be marked. If a row number is not indicated, assign the value to the row that is in edit mode.

sqltableSetFieldValue (p_boxid, colname, data, rowid)

Modifies the value of a cell in the SQL table.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • colname: string

    Name of the column on which you want to change the value.

  • data: Object

    Value to assign.

  • rowid: number (Optional)

    Number of the row to which the field will be marked. If a row number is not indicated, assign the value to the row that is in edit mode.

sqltableToggleSelection (p_boxid)

Modifies the selection of all rows in the SQL table.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

sqltableToggleRowSelection (p_boxid, rowindex)

Modifies the selection of a row in the SQL table.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • p_boxid: number

    Number of the row of the row to select.

sqltreeGetSelected (p_boxid) : JSONObject[]

Gets the data of the selected rows in a SQL tree.

Deprecated:

  • 23/07/2018

    Instead of that, use functions getBoxSelection.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

Return:

  • JSONObject[]

    JSON with the nodes selected. If the node has parents, it will be returned all parent levels.

Since:

  • 05/07/2018

sqltreeRefreshNode (p_boxid, p_parentnode, p_nodevaluesID, loadlcallback) : JSONObject[]

Refresh content of tree node. This function is asynchronous.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • p_parentnode: JSON

    Parent of node to be refreshed.

  • p_nodeid: string

    JSON estructure with the ID fields of node to refresh. ID fiedls are defined on FORM SQL TREE NODES.

  • onlyChildNodes: boolean (optional)

    Allows to indicate if only need refresh node childen.

  • loadlcallback: function (optional)

    Function executed when node is loaded.

Since:

  • 05/07/2018

sqltreeRefreshNodeByPath (p_boxid, p_path, loadlcallback) : JSONObject[]

Refresh content of tree node. This function is asynchronous.

Parameters:

  • p_boxid: string/number

    It can be both the mnemonic code of the box (boxcode), and the internal identifier of the database (boxid).

  • p_path: string

    Path of node to refresh. (Path use slash, and label to identify the node. Example: "/files/movies/Rocky IV")

  • loadlcallback: function (optional)

    Function executed when node is loaded.

Since:

  • 09/09/2019

toFileAddTotalColumn (colname)

Parameters:

  • colname: string

    Name of the column on which you want to change the value.

toFileMarkAll ()

Select all visible rows of a multi-selection form.

toFileUnmarkAll ()

Deselects all visible rows of a multi-selection form.

toFileSwitchLines ()

Changes the selection of all visible rows of a multi-selection form.

toFileVerifyMarks () : boolean

Check if there is a selected row in a multi-selection form.

Return:

  • boolean

    -true if there is a selected row in a multi-selection form.

    -false otherwise.