Structured Retrieval

The Structured Retrieval component retrieves data from the specified database resource, according to the user-supplied selection criteria, and makes the data available to the Procedure.

The Structured Retrieval component encapsulates the SQL query into a graphical shell that hides the intricacies of SQL programming from the end user; in its simplest form it takes the names of the database resource (table or view) and fields (table/view columns) to be retrieved, optionally adds selection criteria to narrow down the search, and executes the query.

When you introduce the Retrieval component into the Workspace from the Palette, it will be a simple object with two fields: the first field will accept the name of the target database table by selecting or drag-dropping it into the component; the second field (in the Get Field section) will receive the field name to be retrieved from the stated database table.

When the instructions associated with the Retrieval component are executed, it searches the target database table for matching records, according to the selection criteria and loads all found data for the specified fields into internal memory. These accumulated records are then loaded into the procedure variables (of Database field kind) incrementally, one record at a time in a looping sequence, controlled by the flowchart.

To utilize a Retrieval component, follow these steps:

  1. drag a Retrieval component into the Workspace;
  2. decide on the number of fields to be retrieved. If the number exceeds one field (the default), grab the bottom center control point and pull down until you have the number of desired slots:

  1. select or drag-drop the desired Database Source from the Palette into the Retrieval component (this will display the available fields in the Database Fields column of the Palette's Main resources view;
  2. select or drag-drop the desired Database Source Fields (this will insert them into the Get Field area of the Retrieval component);
  3. with the Retrieval component still selected, make your specifications in the Inspector. This involves four views:

Row processing

lets the user select one or more displayed rows by clicking on them (to select multiple rows, hold Ctrl key down), effectively manually reducing the size of the stack. Selection of multiple rows is only possible if "Select many" radio button is checked:

steps through this reduced stack of data, one at a time, from the top down.

Search

The Search view of the Inspector acts as an additional filter, if desirable, for the Retrieval component (in the Workspace) which specifies the target database table and its specific field(s) for retrieval.

The Search view consists of a single scrollable view which shows all available fields, both user-defined and system fields, for the database table specified in the Retrieval component. To include a field in the Search, select the desired field and drag the field tile above the text header Drag fields above this line. Once dragging is complete, the field tile will display its four component parts:

See a more detailed explanation of some of the parts of the Inspector's Search view (as well as Sort and Expert)

Sort

Drag the desired field(s) above Drag fields above this line and set each line to ascending (arrow button up) or descending (arrow button down) order for simple or hierarchical sorts.

Expert

The Expert view displays the WHERE clause of the SQL SELECT statement generated by the graphical settings established by the Search and/or the Sort. The scrollable view is editable and the WHERE clause can be:

In addition, the Lock table feature can be invoked

  1. connect the component(s) (i.e. the Retrieval component and possibly the Next row? Conditional component).

You are now done with the Retrieval component. When executed, it searches the target database table for matching records, according to the selection criteria and loads all found data for the specified fields into internal memory. These accumulated records are then loaded into the procedure variables (of Database field kind) incrementally, one record at a time in a looping sequence, controlled by the flowchart.