Please enable JavaScript to view this site.

Process Designer

Navigation: Javascript API > User dialog functions > SQL element functions > Read SQL table values

jr_loop_table(string subtableViewName, string callbackFunction)

Scroll Prev Top Next More

This function offers the possibility to iterate in a loop via an SQL table and perform functions for single lines. You only need the SQL table from the dialog and the function that you have created before for the processing of the single lines. This function is now called line by line from the SQL table and gets the name of the SQL table as a parameter. Additionally it will be linked to the ID of the current line. These parameters enable you to read now any data from that line.

Parameter

Type

Description

tableName

string

Name of the SQL table

callbackFunction

function

Optional: Specification of a Callback function (See example) that is called for each line. As parameters it gets the name of the SQL table and the line number.

Example:

function TableLoop (sqltable, rowId) {

 var email = jr_get_table_value(tableName, rowId, SPALTE1');

}

jr_loop_table('SqlTabelle1', TableLoop);