Set Up a Snapshot Field

Generally, in a master-detail relationship, the lookup field in a detail record effectively imports the current value of a field in the master record. If the value of the field in the master record changes, then the value in the lookup field changes as well. There are times; however, when it would be useful to freeze the value in a lookup field.

For example, in an Order Entry application with a Products table and an Order Details table, there might be a lookup field in the Order Details table that looks up the price of an item in the Products table. When someone places an order, they order the product at its current price and that's what they expect to pay. The price should never change in the Order Details table if the price changes at a later date in the Products table.

You can capture the value in a specific lookup field used in a master-detail relationship and freeze it by setting the Snapshots field property for the field that will hold the frozen values. Once you have captured the value of a specific lookup field, the value in this field (in the detail table) will not change when changes are made to the master record.

When you initially set up a snapshot field for an existing application, you may want to update all the existing records with a snapshot of the current value. You can do this by selecting the Initialize field for existing records option. If you select this option and the field you designate as a snapshot field contains existing values, those values will be overwritten with the current value in the master record.

When setting up snapshot fields, the following rules apply:

To set up a snapshot field:

  1. Open the multi-table application for which you want to set up a snapshot field.

  2. If a relationship doesn't already exist, create a relationship between the table that contains the field that you want to look up (the Products table in the example above) and the table in which you want to display it (the Order Details table in the example above).

  3. Add a new field in the details table (the Order Details table in the example above) to hold the snapshot value of the lookup field (using the example above, create a field named "Order Price" to hold the snapshot value of a lookup field named "Price").

  4. Click the field name to open the Field Properties page for the field that you just created, and scroll to the Advanced section of the page.

  5. Click Get this field's value from a lookup field and don't allow the value to change.

  6. From the Lookup field dropdown list, select the lookup field whose value you want to capture.

  7. To update all the existing records in your application with a snapshot of the current value (or the current price, in this case), select Initialize field for existing records, click Save, and then click OK to confirm that you want to overwrite the existing values in this field with the current values in the master record.

    Note: This option is only available at the time you initially set up the snapshot field.

 

This page refers to an older version of QuickBase. Online help is now located at http://www.quickbase.com/user-assistance/default.html.

 

Return to top   

© 1999-2013 Intuit Inc. All rights reserved. Legal Notices.