Please enable JavaScript to view this site.

Process Designer

Navigation: Javascript API > User dialog functions > SQL element functions > Update SQL elements

jr_subtable_refresh(string subtableViewName, string columnName, int rowId, string onSuccessCallback, string onErrorCallback)

Scroll Prev Top Next More

This function updates SQL elements in a subtable view. The current status of an element (e.g. disabled) is not affected by this.

Parameter

Type

Description

subtableViewName

string

Name of the subtable view

columnName

string

Optional: Name of the column that is to be updated. If nothing or "*" is specified, all columns are updated.

rowId

int

Optional: ID of the row that is to be updated. If nothing or "*" is specified, all lines are updated.
The variable [jr_row] can be used here if the call takes place within an event of a subtable view element. In this case only the current row is updated.

successCallback

function

Optional: Specifies a callback function (see examples) to be executed in case of success. The subtable view name, the element name and the row number are passed to it as parameter.

errorCallback

function

Optional: Specifies a callback function that is executed in case of an error (see examples). The subtable view name, the element name, the row number and the error message are passed to it as parameter.

Example

JS API call

There are various application examples for updating SQL elements in subtable views:

jr_subtable_refresh('mySubtableViewName','myColumnName2','*'); // updates the SQL element from the "myColumnName2" column for all rows

jr_subtable_refresh('mySubtableViewName','*','*'); // updates the SQL element in all columns and rows

JS API call with [jr_row] variable

In events of subtable view elements the [jr_row] variable can be used:

jr_subtable_refresh('mySubtableViewName','myColumnName2',[jr_row]); // updates the SQL elements in the "myColumnName2" column in the current row

jr_subtable_refresh('mySubtableViewName','*',[jr_row]); // updates the SQL elements in all columns in the current row

Usage of [jr_row]

Usage of [jr_row]

 
SQL structure

The contents of the SQL elements result from the stored SQL. Existing process table fields can be accessed here.

SELECT DISTINCT mimetype FROM JRFILES WHERE mimetype LIKE '%[mySubtableViewName_myColumnName1]%'

If you want to refer to a column from a subtable view in an SQL, the following notation is generally required:

[<subtableViewName>_<columnName>]