# Mapping data using a filter

Based on [Launching a lookup flow to join complementary data](https://help.qlik.com/talend/en-US/components/8.0/txmlmap/txmlmap-tfileinputxml-tlogrow-tlogrow-launching-lookup-flow-to-join-complementary-data-standard-component-based-on), this scenario presents how to apply filter condition(s) to select the data of interest using tXMLMap.

## Mapping data using a filter

### Procedure

1. In Talend Studio, open the Job used in the previous scenario to display it in the design workspace.

   ![Job description.](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Use_Case_tXMLMap1.png)
2. Double-click the tXMLMap component to open its Map Editor.

   ![Map Editor for tXMLMap.](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Use_Case_tXMLMap10b.png)
3. On the top of the Customer output table, click the ![Arrow](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Expression_Filter.png) button to open the filter area.

   ![Customer output table.](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Use_Case_tXMLMapFilter1.png)
4. Drop the idState node from the main input table to the filter area. The XPath [row1.Customer:/Customers/Customer/Address/idState] of the idState node is added automatically to this filter area.
5. Enter == 2 after the XPath of the idState node.

   The complete filter condition becomes [row1.Customer:/Customers/Customer/Address/idState] == 2. This means only the customer data with the state ID of 2 will be passed to the output flow.
6. Click OK to validate the changes and close the map editor.
7. Press Ctrl+S to save the Job and then F6 to run the Job.

### Results

![Job results.](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Use_Case_tXMLMapFilter2.png)

As shown above, the customers Griffith Paving and Sealcoatin and Glenn Oaks Office Supplies, whose state ID is 2 are displayed on the console.