locked
How to filter Data on InfoPath repeating table from SharePoint List RRS feed

  • Question

  •  

    Hello,

    Here is the scenario for the problem we are facing

    We have an InfoPath form that pulls data from a SharePoint 2007 list .

    The data is pulled via a repeating table , to make things simplified  the list has Province column and city column, in Province  we have ON,QC and BC

    in city column we added the corresponding city to the Province i.e ON will have  Toronto, Ottawa and Kingston each on a separate entry/line on SharePoint list

    Same logic is used to add cities to QC i.e Montreal, Quebec and BC ( Vancouver, Victoria)

    The repeating table does pull the corresponding City based on Province selection via a drop-down repeating table linked to a udcx data connection to the SharePoint list , however the list on the city shows all cities regardless of selecting on Province

    The InfoPath form does not allow us to add filters to the reapeating table data connection when trying to connect to the data source and do filter on the Entries, taking into consideration that this form is Browser Eabled form

     

    Any Help with this issue would be greatfull

     

    Thanks

    Tuesday, February 14, 2012 4:46 PM

Answers

All replies

  • If your form is browser based form and if it is infopath 2007, filtering is not supported on drop down lists. In this case you can bind drop downs to a secondary data source such as XML document with some dummy data and in form loading event and province value changed event, you can update this xml document to fill dropdowns appropriately. You can refer below page for the same.

    http://www.bizsupportonline.net/infopath2007/programmatically-fill-populate-drop-down-list-box-infopath-2007.htm

    If the form is not browser based, you should get the filter option while binding city dropdownlist.

    Thanks,

    Rahul Babar


    ASP.NET, C#, Sharepoint 2007/2010, Infopath 2007/2010 Developer

    Thursday, February 16, 2012 7:34 AM
  • Hi kal17

    Filter pull data is not supported in browser-enabled form templates in Infopath.  In browser-disabled form templates, you can achieve it as following:

    Right-Click the City Control->Drop-Down List Box Properties->Look up values from  an external data source(choose your data)->Entries(Select XPath)->Filter Data(set your filter)

    Thanks,

    Lhan Han

    Thursday, February 16, 2012 7:51 AM
    Moderator
  • Assuming you need to populate both City and Province, have you considered using a filter to populate the Province (textbox) based on a drop down of city section? The filter should work this way.
    Thursday, February 16, 2012 9:30 PM
  • Thanks Rahul,Lhan and Robert

    Actually one of the requirments for my form to be usable on SharePointis not to have any Coding in it so I'd rather not having any code in the Form

    Adding , I've tried filtering with Xpath as per Lhan's and  the data connection filtering does not allow using the Xpath,I can't add the Xpath under Entries or Values.

    I also followed the toturial Video on this link http://www.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Data%20View%20Web%20Part/media/1bbfbe11-ee40-497f-b73e-296a151f2a4b

    And it does not tell me anything about filtering on a repeating table on a browser enabled form  , the video on screencast talks about filtering on a non-repeating table that pulls data from SharPoint list

    Any ideas.?

    Thanks All for your Time

    Kal.

    Tuesday, February 21, 2012 1:54 PM
  • Hi kal17,

    Filtering on a repeating table on a browser enabled form is not supported currently in InfoPath. 

    Thanks,
    Lhan Han

    Wednesday, February 22, 2012 4:04 AM
    Moderator
  • How about using the XML web service to access a particular view?

    http://blogs.msdn.com/b/infopath/archive/2007/01/15/populating-form-data-from-sharepoint-list-views.aspx

    You could use rules to access different views depending on the city, but you can't construct a dynamic connection string. But you may be able to find a way round it.

    Wednesday, February 22, 2012 4:11 PM