| dbDisplayLookupList |
Perform lookup to retrieve a value. Lookup value's Key and value pair can be either from database or specified by user and can be mixed. A special case in template where [[FieldName:R]] will place the "Raw" value of the field instead of the lookup value.
| Property Syntax |
Obj.dbDisplayLookUpList="(;|+)FieldNameNumber|ConnStr|LookUpSQL; User|FieldNameNumber|Pairs|Key1|Value1|Key2|Value2..."
| Parameters |
| Parameters | Description |
| (;|+) | ; = default Groups delimiter. | = default fields delimiter. + = default dbDat delimiter |
| FieldNameNumber | FieldName or FieldNumber |
| ConnStr | If left blank then current connection will be used |
| LookUpSQL | SQL text to retrieve the lookup value. It must return two columns. Column 0 will be the used to match the LookUpKey and the second column contains the lookup values. |
| Pairs | How many items (pairs) is in the user specified values. |
| Key? | User specified Key values. |
| Val? | User specified lookup values. |
| Example |
| <% Set X= Server.CreateObject("Asp.DB") X.dbUnit = 1 X.dbMode="grid" X.dbDSN = "NWIND" X.dbSQL = "SELECT EmployeeID, ReportsTo from employees" X.dbDisplayLookUpList = "(;|)ReportsTo|mdb=e:\vdata\nwind\Nwind2000.mdb|SELECT EmployeeID, FirstName & ' ' & Lastname as Name FROM Employees;User|EmployeeID|9|1|One|2|Two|3|Three|4|Four|5|Five|6|Six|7|Seven|8|Eight|9|Nine" X.dbBlankText="N/A" X.ASPdb %> |
| Output |
Study this output and match it with the code.
| Notes |