Tornado API Library - V12.30.08

z.dbDynalist Property

Dynamic List is an implementation of advanced drill down queries.

Product Version

Gold
[VisualBasic]
PublicPropertydbDynalistAsString
[C#]
publicstringdbDynalist{set;}

Property Value

Mydb.dbDynalist="(;,) InputHTML| Outputaspx; Level| Tag| Label| DropValueIndex| DropTextIndex| DSN| SQL| Table| Field; Repeat Level1 |Tag1 ..."

KeywordDescription
InputHtmlIn-Memory or Virtual Input file template. If the parameter starts with a File= then the virtual file will be read. Otherwise, In-Memory template is assumed. The required macros in this template files are [[level0]], [[level1]], .... [[levelx]]. This macro will be stuffed with the drop box holding the level information.
OutputAspxThis is the file that accepts the trigger values from the dynamic list to compose the application output.
Repeating Parameters - One per level delimited by Group delimiter(;)
KeywordDescription
LevelLevel number starts at 0.
TagSelect box tags like Multiple; Size; etc -> <SELECT name=... Tags ...
LabelLabel to the left of the Select box
DropValueIndex

DropTextIndex

<SELECT .....>

<OPTION VALUE="Value1">Text1

<OPTION VALUE="Value2">Text2

</SELECT>

For SQL - Which field should be used for the Value and Text array?

e.g. SL=SELECT a,b,c,d,e FROM ....

If DropValueIndex=0 then 'a' will be used

If DropTextIndex = 4 then 'e' will be used

For shortcut Table-Field, Value=0 and no need to specify.

DSN If blank then use system dbDSN, otherwise will use as specified.
SQL Full SQL query for the level - 1 or 2 fields for value and text. If SQL !="" then Table and Field will be ignored. The progressive format of the SQL for each level is like ->

Level 0: SELECT DISTINCT BookTitle FROM BibleTable

Level 1: SELECT DISTINCT Chapter FROM BibleTable WHERE BookTitle = '{{0}}'

Trigger: SELECT Verses FROM BibleTable WHERE BookTitle = '{{0}}' and Chapter = '{{1}}'

Note: Make sure the field wrappers corresponds to the DB type. (e.g. # for Access date and ' for SQL date)

Table

Field

If SQL="" then Table + field will construct the SQL as:

SELECT DISTINCT field1 FROM table

SELECT DISTINCT field2 FROM table WHERE field1 = '{{0}}'

SELECT DISTINCT field3 FROM table WHERE field1 = '{{0}}' AND field2 = '{{1}}'

more levels...

QuickProp Keyword Abbreviation

dl

Remarks

Dynamic list is a very popular drill down implementation of linked queries especially in shopping cart applications where it enables final target item to be located without having to make queries with empty returns. The Input HTML template is the setup that contains drop boxes of different levels. The Output ASPX file is the "trigger" program that process the selected values of from the levels.

If Selection=1 item then there will be no dropdown box. It doesn't make sense to have a drop box with one selection item.

See Also

z Class | Tornado Namespace | Special Topic - Dynalist