By using list box controls with repeating tables (repeating table: A control on a form that contains other controls in a table format and that repeats as needed. Users can insert multiple rows when filling out the form.) or repeating sections (repeating section: A control on a form that contains other controls and that repeats as needed. Users can insert multiple sections when filling out the form.), you can create filters that allow users to show or hide data from a primary data source (data source: The collection of fields and groups that define and store the data for an InfoPath form. Controls in the form are bound to the fields and groups in the data source.) on their form. These filters display only the rows or sections that meet conditions specified in the filter. Users typically apply a filter by selecting entries in another control. For example, if you are designing a form that allows users to work with customer data in a repeating table, you can include a list box that allows them to filter customers by city.
Note You can only filter data from a primary data source. Because you cannot filter data from a secondary data source, the Display tab for a control connected to a secondary data source does not include any filter options.
When users move their mouse pointer over a filtered row or section on their forms, a filter icon appears on the shortcut menu button next to each row or section. This icon indicates that a filter has been applied. Users can click the shortcut menu button to see options for inserting or removing rows or sections, and also for refreshing the filtered data, if necessary. If you don't want users to see this icon, clear the Show filter icon to indicate filtered items check box in the Properties dialog box for the repeating table or repeating section.
You can also use a filter to create cascading list boxes (cascading list box: Two or more list boxes that are connected to each other in such a way that selecting a value in one changes the set of choices in the other.). In this scenario, a selection in the first list directly affects what appears in the second list. For example, you can create a Manager list and an Employee list on a form. When a user clicks a name in the Manager list, the Employee list displays only those employees who report to that manager.
Note The information in this topic may not apply if you are working with a form designed using Microsoft Office InfoPath 2003 without the service pack installed.