Hi,
Here are the exact steps I just completed that appear to work as you need:
- Create a new, blank InfoPath form
- Add a drop-down list box
- Add a text box named: txtProjectName
- Add a text box named: txtPlannedExpense
- Add a data connection to the first XML file named: XMLFile1
- Add a data connection to the second XML file named: XMLFile2
- Set the data source of the drop-down list to XMLFile1 and set the Value
and Display Name to: @ProjectNumber
- With the Properties window still open for the drop-down list box, click
the Rules button
- Click Add
- Click Add Action
- From the Action box choose: Set a field's value
- Click the button next to the Field box, select txtProjectName and click OK
- Click the button next to the Value field
- Click Insert Field or Group
- From the Data Source box select: XMLFile1
- Highlight ProjectName and then click the Filter Data button
- Click Add
- In the first box, choose: ProjectNumber
- In the second box, choose: is equal to
- In the third box, choose: Select a field or group
- From the Data Source box choose Main, highlight field1 (the drop-down
list) and click OK
- Click OK 5 times to get back to the Rule window
- Click Add Action
- From the Action box choose: Set a field's value
- Click the button next to the Field box, select txtPlannedExpense and
click OK
- Click the button next to the Value field
- Click Insert Field or Group
- From the Data Source box select: XMLFile2
- Highlight PlannedExpense and then click the Filter Data button
- Click Add
- In the first box, choose: ProjectNumber
- In the second box, choose: is equal to
- In the third box, choose: Select a field or group
- From the Data Source box choose Main, highlight field1 (the drop-down
list) and click OK
- Click OK 8 times to get back to your form
- Preview and test!
Let me know if these work for you!
Scott L. Heim
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.