Find by Key - Action Scripting

IN THIS PAGE

Description

The Find by Key action searches for records matching a specified key value using the Find by Key dialog. This action gives you the option to specify the key to search for in advance, or prompt the user at run-time.

 Overview

The Find by Key action requires that the current index be of the same data type as the value you are searching for. This action should generally be proceeded by the Set Index action that sets the primary index, or an action that sorts the data by the field or fields by which you want to find, such as Quick Sort.

 Procedure

  1. Make a selection in the Go to record in which Form/Browse window? field. This field will be grayed out unless this action is based on a Form or Browse. The choices are:

    • "Current Form or Browse Window".

    • "Another Form or Browse Window".

  2. If you selected "Another Form or Browse Window", in the Window Name field select either:

    • "Forms"

    • "Browses"

  3. Select one of the listed forms or browses.

  4. In the How will you specify which key value to go to? field select one of the following values.

    • "Specify record key value now"

    • "Specify a variable that contains the key value"

    • "Specify an expression that evaluates to the key value"

    • "Prompt user for key value at run-time"

  5. If you selected "Specify record key value now", enter a value in the Key Value field.

  6. If you selected "Specify a variable that contains the key value", select an existing variable for the Variable Name list or enter the name of a variable. In the latter case, you will also have to select the variable's type in the Variable Type list.

  7. If you selected "Specify an expression that evaluates to the key value", enter an expression into the Expression field. Optionally, click the Expression icon to open the Expression Builder.

  8. Click Next >.

  9. Optionally modify the comment that describes the action.

  10. Click Finish.

See Also