Condividi tramite


How to: Add Controls to the Filter Pane

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

A list page includes a default filter pane that enables you to search the records in the data grid. By default, you can search based on one of the columns displayed in the data grid. To create a filter that is based on multiple values in the data source query, you have to add controls for those fields to the filter pane. For example, the following illustration shows two controls that were added to the filter pane of the Collections list page.

Filter pane from the Collections list page

Filter pane with additional form controls

The values in the controls are used to filter the records that appear in the list. To add controls to the filter pane, follow these steps.

To add a control to the filter pane

  1. In the AOT, expand Forms, expand the list page form, expand Designs, and then expand Design. Click the Filter group control and set the Visible property to Yes.

  2. Right-click the Filter group control, click New Control, and then click the type of control you want to add. For example, click ComboBox to add a control that enables you to select a value from a list.

  3. If the filter pane contains other controls, use the ALT+UP ARROW or ALT+DOWN ARROW to change the position of the control that you added.

  4. Right-click the control, and then click Properties. If you want the control to include a list of values that you can click, add an extended data type (EDT) or enumeration to the control properties.

    To add an EDT or enumeration, use the Properties window to specify the value for one of the following properties.

    Property

    Value

    EnumType

    Click the name of the enumeration.

    Use EnumType when you want to open a list of enumeration values from the control.

    ExtendedDataType

    Click the name of the EDT.

    Use ExtendedDataType when you want to open a list of EDT supplied values from the control.

    Important

    The use of an EDT or enumeration is optional and does not apply to all kinds of controls.

  5. To filter the data source query, you connect the value of the control to the value in a data field of the list page data source. To associate the control with a data field, populate the following properties of the filter control that you added.

    Property

    Value

    FilterDataSource

    Click the data source that includes the data field you want to associate with the filter.

    FilterField

    Click the data field that includes the values that you want to use to filter the query.

    FilterExpression

    Typically, you use the default value.

    However, you can enter an expression that includes additional filter values. You use the same expression syntax that you use with a query range expression. For information about query range expressions, see Using Expressions in Query Ranges.

    Label

    Select a label that describes the values that are used to filter the list.

  6. Right-click the list page form, and then click Save.

See also

Form Control Properties

Query Elements in the AOT

How to: Create Queries by using the AOT

List Page Overview

Overview of Form Control Types

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.