Tornado API Library - V12.30.08

z.dbLookUpFlds Property

Define Fields/Columns in the SQL as a key and display the lookup instead of the raw key value.

Product Version

All
[VisualBasic]
PublicPropertydbLookUpFldsAsString
[C#]
publicstringdbLookUpFlds{set;}

Property Value

Obj.dbLookUpFlds = "FieldNameNum-1| Key | Lookup, FieldNameNum-2| Key | Lookup, ....repeat"

KeywordDescription
FieldNameNumField name or field number of the active table that requires lookup
KeyName of Master Index to use. The item in the field will match the corresponding in the Key List
LookupName of LookUp Index to use. Value from this list will be returned

QuickProp Keyword Abbreviation

luf

Example

This example lookup the employeeid and reportsto field and display the first & last names instead.

<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
  Dim XL As New Tornado.z
    With XL
    .dbQP = "U=8| M=ty=dh!sys=t| S=aspdb| D=NWIND| Q=employees|" & _
      "Gdf=0| Fmhf=0| Ps=10|Mts=128| Th=Ti=LookUp"
    .dbGridMagicCell = "field=EmployeeID|alias=My ID is - #0#"
    .dbCommonTables = "index=EID,FullName|sql=Select employeeid," & _
      "Firstname & ' ' & Lastname from employees"
    .dbLookUpFlds = "field=ReportsTo|keyindex=EID|lookupindex=FullName," & _
      "field=Employeeid| keyindex=EID|lookupindex=FullName"
    .ASPdbNET()
  End With
End Sub
</script>

See Also

z Class | Tornado Namespace | dbCommonTables | Special Topic - Lookup & Dropdown