Sample Applications / Order Form / Order Details

  Configure Lookup Field

Table of Contents
Sample Applications / Order Form / Order DetailsPrint||
Configure Lookup Field

Let’s make similar changes to the Order Details controller. We’ll make the ProductID lookup open in search mode upon creating a new order detail. When selecting a product, the Unit Price will also copy over into the order detail.

On the Controllers tab of the Project Explorer, double-click on OrderDetails / Fields / ProductID (Int32) –> Products field node.

ProductID field in OrderDetails controller in the Project Explorer.

Change the following settings:

Property New Value
Data Value Field ProductID
Data Text Field ProductName
Copy UnitPrice=UnitPrice
Search on Start True
Activate if Blank True
Lookup window description Select a product.

Press OK to save the field, and press Browse in the top left corner.

Navigate to the Order Form page, and select any order. Create a new order detail record. A lookup will open prompting you to select a product.

When creating a new order detail, the product lookup opens in search mode.

Select a product, and you will see that Unit Price of the product has been copied into the order detail.

When a product is selected, the Unit Price of the product is also copied over.