SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having some issues with InfoPath. This is the case: On SharePoint we have 2 lists:

  • ListA
  • ListB

ListB contains a lookup field to ListA. I customized the displayform of ListA with Infopath and now I want to show the items of ListB on that form filtered by the lookup column.

I want something like this:

ListA: Title=demo Date=xx/xx/xxxx

Items in ListB that belongs to Title=demo

  • ListB-item1
  • ListB-item2

I've added a secondary datasource to the form that points to ListB but I can't see how I can filter the datasource?

Who can help me?

share|improve this question

You could definitely rely on filter values to filter out other sources. Have a look at this (start with XPath filtering and add additional conditions).

share|improve this answer
I want to display the data in a repeating section, not a control. That's the problem. I cannot filter the repeating section when the data comes from a secondary datasource. – Gene Vangampelaere May 24 '12 at 8:32

You can use InfoPath to filter what appears in the form based on your selection of the lookup field. In InfoPath on the fields that will contain the data from the other list you can select what appears dependent on the selection made in the lookup field. How you do this depends on the type of field; if it's a drop down then you filter the choices; if it's a text box then you build the string for the default value. No code needed either, it's all a case of choice boxes when building the properties of the field.

If you go to my blog there should be some videos I recorded showing how we did it for the School I work at.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.