|
jr_sql_refresh(string|array elementName, function onSuccessCallback, function onErrorCallback, boolean sequential) |
Scroll Prev Top Next More |
This function refreshes SQL elements inside a form. The current status of an element (e.g. disabled) is not affected by this.
Parameter |
Type |
Description |
|---|---|---|
elementName |
string | array |
Name of form element or array of several form elements to be updated. |
successCallback |
function |
Optional: Specifies a callback function (see examples) to be executed in case of success. The element name and the old value are passed to it as parameter. |
errorCallback |
function |
Optional: Specifies a callback function that is executed in case of an error (see examples). The element name and an error message are passed to it as parameter. |
sequential |
boolean |
Optional: Specifies if the updating of multiple elements is done sequentially (true) or parallel (false). The default value is false. |
Example
JS API call
To update SQL lists in form, the name of the form element must be referenced.
jr_sql_refresh('mySqlListElement');
If several form elements are to be updated simultaneously, an array must be passed to the function with names of the form elements.
jr_sql_refresh(['mySqlListElement1','mySqlListElement2','mySqlListElement3']);
Please note: If the dialogue elements are specified as an array, the callback functions are called for each element.
SQL structure
The contents of the SQL lists result from the stored SQL. Existing process table fields can be accessed here.
SELECT DISTINCT lastname FROM JRUSERS WHERE lastname LIKE '%[lastname]%'