SQL Statements Used in Tree Views

Previous Next

USoft tree views are populated with data retrieved by SQL statements defined in the SQL Query property of Tree View Node objects.

How exactly this happens is determined by the combination of the SQL statements, the value of the Root Nodes property of the Tree View object, and the value of the Child Nodes property of the various Tree View Nodes.

In the SQL Query of a tree view node, only the first column will be displayed. If you want to display more than one column in a tree view node, consider concatenating those columns in the SQL Query of that tree view node. For example:

SELECT    p.first_name||' '||p.last_name

FROM      person p

ORDER BY  p.last_name

 

Each tree view node will by default be ordered by the first selected column in the SQL Query. If a tree view node has more than one child node, these child nodes will be ordered together by their first selected columns.

For each child node query, use a column identifier to refer to the parent tree view node just as with columns in "ordinary" info windows. Make sure that you include this column in the SELECT list of the parent node SQL query.

For more information, refer to help topic: "How to Insert a Tree View", or to the advanced help topic: "Example: Creating a Project Catalog".