Exercise: Relate ProductModel to Product and Lookup ProductModelName
In TimeXtender, Table Relations and Conditional Lookups are created by dragging a field from the source table onto the related field on the destination table. For more detailed information, please see Table Relations.
Steps:
Relate two tables and create a Conditional Lookup field
- Right click ProductModel table and select Open in New Window (alternatively select the table and type ctrl-w)
- Drag the field ProductModelID from the ProductModel table and drop it on the ProductModelID field in the Product table. This will create a relation on the Product table.
- Drag the field ProductModelName from ProductModel and drop it on the Product table. This will add a Conditional Lookup Field.
- Close the window with the ProductModel table.
Note: Video is free of audio
Validate the Conditional Lookup field content
- Drag the field ProductModelName in the Product table and drop it just beneath the field ProductModelID. This will reorder the field.
- Right click the Data Warehouse node DSA and select Deploy and Execute
- Tick the Selected Objects option Only modified tables and view and click Start button
- Right click the Product table and select Preview. Notice the Null values in the ProductModelName and ProductModelID fields.
- Click the Query Tool button and type in the following where clause in the T-SQL statement: Where ProductModelName is not null
- Notice that ProductModelName is filled with proper values, when ProductModelID is also filled
Note: Video is free of audio