Data Record Loop
Last updated
Last updated
Data Record Loop
is a regular block that allows you to iterate over all the records retrieved, after a successful read operation, by the Data Read, Data Read Next Page and Data Read Previous Page blocks.
NOTE: This block will provide valid values only after the Data Read, Data Read Next Page and Data Read Previous Page blocks complete their execution. The Data Status block can be used to track the completion.
The block consists of the following (from top to bottom):
Table: Value Parameter that accepts a text value representing the name of the Database Table .
Dataset Name: Value Parameter that accepts a text value representing the name of the dataset on which a database read was conducted using the Data Read, Data Read Next Page and Data Read Previous Page blocks.
Tasks: a Flow Parameter where you connect blocks that specify what you want done with each record. Use the Data Record Info and Data Record Loop Index blocks here to access the record information for each iteration.
NOTE: Please refer to the prerequisite information shown here before seeing the example.
The image below shows an example of the Data Record Loop
block. This example incorporates the Usage Example function, as outlined in the Database Reading Logic for examples section on the prerequisite information page mentioned above.
Here is a summary of the above example:
The Data Record Loop
block is used with the Customers Database Table and the dataset name of ds1 are as Value Parameters .
For each iteration inside the Tasks Flow Parameter, we use the Write Log Message block to log the customer's full name by accessing the FirstName and LastName fields of each record and combining them.
To access information about the record, we use the Data Record Info block.
For the FirstName and LastName fields we use the Get Object Property block.
The result for the above example can be seen in the browser's web console, and a sample is shown below: