Levelled List
A levelled list is one where the ID and Caption for each level is represented by a different column. For example, the list may contain 3 columns: Department, Section, Name. The Tree View will automatically create "section" entries as children of "department" entries and "name" entries as children of "section" entries.
Two properties control how it does this:
key_fields
|
A comma delimited list of field names. These fields are used as keys for each level. As the list is processed, the key fields are compared, in order, with the key fields from the previous entry, if they change, a new tree entry is created at the key field level.
|
display_fields
|
A comma delimited list of field names. These fields contain the text to be displayed at the corresponding level.
|
For example, a working list like this:
DEPTMENT
|
SECTION
|
EMPNO
|
DISPNAME
|
DEPTDESC
|
SECDESC
|
ADM
|
01
|
A1001
|
BEN JONES
|
ADMINISTRATOR DEPT
|
INTERNAL ADMIN SRV
|
AUD
|
01
|
A1007
|
GEORGE SNELL
|
INTERNAL AUDITING
|
ADMINISTRATION
|
AUD
|
01
|
A1008
|
ALLAN SNEDDON
|
INTERNAL AUDITING
|
ADMINISTRATION
|
AUD
|
01
|
A1011
|
CHRISTOPHER PERRIN
|
INTERNAL AUDITING
|
ADMINISTRATION
|
AUD
|
02
|
A1009
|
DAMIAN SNASHALL
|
INTERNAL AUDITING
|
PURCHASING
|
AUD
|
03
|
A0907
|
ANNE MISS SIMPSON
|
INTERNAL AUDITING
|
ACCOUNTING
|
AUD
|
03
|
A1010
|
WILLIAM PERRY
|
INTERNAL AUDITING
|
ACCOUNTING
|
FLT
|
01
|
A1016
|
JACK TURNER
|
FLEET ADMINISTRATION
|
ADMINISTRATION
|
FLT
|
02
|
A1003
|
Robert SMITHE
|
FLEET ADMINISTRATION
|
PURCHASING
|
FLT
|
03
|
A0090
|
FRED JOHN ALAN BLOGGS
|
FLEET ADMINISTRATION
|
ACCOUNTING
|
GAC
|
02
|
A1018
|
PAUL ZACHARIA
|
GROUP ACCOUNTS
|
PURCHASING
|
INF
|
01
|
A1030
|
VALERIE TURNER
|
INFORMATION SERVICES
|
ADMINISTRATION
|
INF
|
02
|
A1017
|
GARY NEAVE
|
INFORMATION SERVICES
|
PURCHASING
|
LEG
|
01
|
A1019
|
CHARLES DICKENS
|
LEGAL DEPARTMENT
|
CONTRACTS, LOCAL
|
LEG
|
03
|
A1023
|
DAVID REID
|
LEGAL DEPARTMENT
|
ACCOUNTING
|
MIS
|
EI
|
A1031
|
JOHN BLAKE
|
MANAGEMNT INFORMATIO
|
EXECUTIVE INFORMATIO
|
MKT
|
01
|
A1024
|
JOHN TAYLOR
|
MARKETING DEPARTMENT
|
ADMINISTRATION
|
MKT
|
02
|
A1022
|
KELLY THOMPSON
|
MARKETING DEPARTMENT
|
PURCHASING
|
SD
|
ES
|
A1234
|
STEPHEN JACKSON
|
SALES & DISTRIBUTION
|
EXPORT SALES
|
TRVL
|
03
|
A1006
|
JACK SMITHERS
|
TRAVEL DEPARTMENT
|
ACCOUNTING
|
|
With key_fields and display_fields set to:
Would produce a tree like this: