- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsGreetings experts,
I need some help on writing a Xpath statement for Infopath to search a secondard datasource and return only results that match the filter(s). I wrote the below but it does not work the way I want it to. What needs to happen is when the Conitnent filter is selected the results will contain ONLY results with that Continent. However, when the ONLY Country filter is selected it will show results for that Country. Lastly, when both filters are selected it will show results where the row contains both filter values. In my example below, when I select both the Country filter and Continent filter I get all rows that contain either the Country or Continent, as opposed to getting rows that contain both. Let me know if that doesnt make sense.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: clayfoxPosted on 2009-10-22 at 08:35:52ID: 25635437
I think you are going at this the wrong way and making it way to complicated. InfoPath has built in functionality that you can use without trying to build something your self.
You are describing what is called cascading dropdowns. If you search on this term on www.infopathdev.com you can find many examples of how to set it up.
Essentially you create a data connection to the continent list and another to the country list. Create two fields and put them on your form with drop downs. Then on the second country dropdown you filter it by the first drop down.
Then for your repeating table with your main records you use conditional formating to only display what is equal to the drop down values or you put the selected value in query fields and query for that specifically.
Infopath can only do a dynamic query with web services or SQL data connections.