Filter not working in GetDropdownEntries - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Filter not working in GetDropdownEntries

Last post 08-16-2011 09:28 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 08-16-2011 07:43 AM

    Filter not working in GetDropdownEntries

    I've configured an IP form to populate a dropdown using GetDropdownEntries from a SharePoint list.  Basic webservice and dropdown configuration work fine.  I'm trying to utilize the filterXML parameter to filter the dropdown but can't figure out the syntex.  Just want to filter based on one of the values in my IP form.

    thanks

    Jeff

  • 08-16-2011 07:49 AM In reply to

    Re: Filter not working in GetDropdownEntries

    Hi Jeff,

    The syntax can be generated using the Query Builder tool. Have you had the chance to use this tool? It's included with DBXL.

    Here are some links that may help:

    http://www.infopathdev.com/files/folders/integration_with_sharepoint/entry65673.aspx

    http://www.infopathdev.com/files/folders/integration_with_sharepoint/entry65674.aspx

    Let us know if you'd like more assistance with this. Thanks.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 08-16-2011 08:47 AM In reply to

    Re: Filter not working in GetDropdownEntries

    Ernesto -

    Still having an issue.  Here's my syntax:

    listURL:http://xxx.xxx.xxx/sites/era/Lists/Human%20Capital%20%20Component%20Offices

    valueColumn:Title

    displayColumn:Title

    filterXml:<query><columns><column name='Title'/></columns><filter><eq><column name='Component'/><value>CBP</value></eq></filter></query>

    I receive the following error:

    Qdabra.Dbxl.QuerySharePointService+TransformQueryException: TransformQuery_ChildOfQuery: under 'query', expected 'filter', 'sort' or 'columns', found 'query'
       at Qdabra.Dbxl.QuerySharePointService.TransformQuery_ChildOfQuery(XmlNode top, TransformState state)
       at Qdabra.Dbxl.QuerySharePointService.TransformQuery_Root(XmlNode top, TransformState state)
       at Qdabra.Dbxl.QuerySharePointService.TransformQuery(XmlNode query, XmlNode& queryXml, XmlNode& viewFieldsXml, String& rowLimit, Boolean& getSample)
       at Qdabra.Dbxl.QuerySharePointService.GetListItems(String siteUrl, String listName, String webId, XmlNode query, XmlNode queryOptionsXml)
       at Qdabra.Dbxl.QuerySharePointService.Qdabra.Dbxl.Services.IQuerySharePointService.GetDropdownEntriesSiteAndGuid(String siteUrl, String listId, String webId, String valueColumn, String displayColumn, String sortColumn, String sortOrder, String filterXml)
       at Qdabra.Dbxl.QuerySharePointService.Qdabra.Dbxl.Services.IQuerySharePointService.GetDropdownEntries(String listUrl, String valueColumn, String displayColumn, String sortColumn, String sortOrder, String filterXml)
    
    thanks
    Jeff
  • 08-16-2011 08:49 AM In reply to

    Re: Filter not working in GetDropdownEntries

     Can you try using only this?:

    <filter><eq><column name='Component'/><value>CBP</value></eq></filter>

    Let us know if that works. Thanks.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 08-16-2011 08:55 AM In reply to

    Re: Filter not working in GetDropdownEntries

    got this error message utilizing your query string

    System.Web.Services.Protocols.SoapException: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       at Qdabra.Dbxl.Domain.SharePointLists.Lists.GetListItems(String listName, String viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode queryOptions, String webID)
       at Qdabra.Dbxl.QuerySharePointService.GetListItems(String siteUrl, String listName, String webId, XmlNode query, XmlNode queryOptionsXml)
       at Qdabra.Dbxl.QuerySharePointService.Qdabra.Dbxl.Services.IQuerySharePointService.GetDropdownEntriesSiteAndGuid(String siteUrl, String listId, String webId, String valueColumn, String displayColumn, String sortColumn, String sortOrder, String filterXml)
       at Qdabra.Dbxl.QuerySharePointService.Qdabra.Dbxl.Services.IQuerySharePointService.GetDropdownEntries(String listUrl, String valueColumn, String displayColumn, String sortColumn, String sortOrder, String filterXml)
    
  • 08-16-2011 09:06 AM In reply to

    Re: Filter not working in GetDropdownEntries

    Ernesto -

    I got it to work, however it's not what I expected.

    I have a test list that has 2 columns - Title, Component

    My requirement is to have the dropdown uses the webservice to populate values using the Title field.  I'd like to filter using the Component field.

    Using the syntax you provided, I get the above exception when trying to filter using Component.  As a test, I modified your syntax to filter using Title which worked.  Given this, is there a way to get my scenario to work?

    thanks

    Jeff

  • 08-16-2011 09:20 AM In reply to

    Re: Filter not working in GetDropdownEntries

    Ernesto -

    Got it to work - thanks for pointing me in the right direction.  The problem was actually with SharePoint - the original column was spelled incorrectly when created.  Despite correcting the spelling, the internal column definition still referenced the original incorrerct spelling.  Adjusted the query parameters and am good to go.

    thanks

    Jeff

  • 08-16-2011 09:28 AM In reply to

    Re: Filter not working in GetDropdownEntries

    This is a common confusion with SharePoint - good job figuring out the issue. Another column that can cause this confusion is the Title column - no matter what you rename it, to SharePoint, it is always 'Title".

    Hilary Stoupa

Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.