Filtering Records to Exclude a Single Field Value

Description

This demonstration of Action Scripting adds a button to the Edit_Customer_Info form. This script will restrict all the records that the form displays to those where "MA" is not the value in the Bill_State_Region field.

  1. Sketch a button on the form.

  2. Enter "Not MA" into the Label field.

  3. Click Launch Script Editor.

  4. Click Add New Action.

  5. Select "Query" from the Category list and "Run Custom Query" from the Action list. Click OK.

  6. Click the Filter 'funnel' button at the right side of the Filter field.

    images/Filter_button.gif
  7. Select the "Bill_state_region" field, the "is not equal to" operator, and enter "MA" into the first condition. Click OK.

  8. The result looks like this.

    images/AL_form_edit_customer_info_not_MA_filter.gif
  9. Click Next > Finish > Finish to return to the Form Editor.

  10. Click 'Save'.

See Also