Creating a Previous Values Lookup


The Previous Values lookup is a great way to dynamically build a choice list from values that have already been entered. In a table containing product information, you might define a Product type field with a Previous Values lookup. Since the number of product types is limited, once you enter several product records, you can select the value from the list instead of typing it in. Many parameters available with the other lookup styles are available for use with a Previous Values lookup, including the ability to display lookup choices in a drop-down list box. If you selected "Conditional Table Lookup", optionally, un-check Display as Drop-down list box if you would like the choices to appear instead in a pop-up dialog box. Refer to Comparing Drop-down Lists and Popup Dialogs.

  1. Optionally, enter a Filter expression that will select which values to display in the selection list. Click the 'x-y' icon to use the Expression Builder to help construct an expression.

  2. Optionally, change the selection in Allow Exceptions. The options are:

    • "Allow any value"

    • "Force closest match"

    • "Popup on mismatch"

    • "Allow any/fill only on popup"

  3. Optionally, if you chose to use a popup dialog, make a selection from Auto popup. Specify whether the Lookup window displays on demand or automatically. The options are:

    • "Do not automatically popup" - The Lookup window displays on demand. You must click the Pop-up smart button attached to the Lookup field. This is the default.

    • "Popup on entrance" - The Lookup window displays every time the cursor enters the field.

    • "Popup conditionally on entrance" - Build a conditional expression that determines whether the window displays automatically. For example, the Pop-up condition: ISBLANK("CUST_ID") causes the Customer Lookup window to appear only if the Cust_ID field is empty.

      • 1. If you selected "Popup conditionally on entrance" in step 4, enter an expression that defines the Popup condition. The expression must resolve to either TRUE (.T.) or FALSE (.F.). Click to display the Expression Builder to help you define the expression.

      • 2. Optionally, select a value from the Position list to indicate where the Lookup window should appear. The listed positions are relative to the Alpha Anywhere Main Application window. The options are:

      • 3. If you selected "Custom" in step 4b, enter position values in the Custom X and Custom Y fields. Enter dimension values in the Custom Width and Custom Height fields.