Need to Consume Filtered External List Item Within InfoPath 2010 Form - InfoPath Dev
in

InfoPath Dev

Need to Consume Filtered External List Item Within InfoPath 2010 Form

Last post 01-16-2013 08:24 AM by Kerry Dirks. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-05-2013 07:05 AM

    Need to Consume Filtered External List Item Within InfoPath 2010 Form

    I have an existing Form where I am capturing information and I now need to display an external list field on the Form as well.

    The external list is already configured on the same site as the Form
    - the list contains ~9,000 rows
    - there are 2 filters on the list view that are set as follows
        * Employee Login ............... {MyServerParm} 
                  [MyServerParm is associated with the ServerVariable of LOGON_USER]
        * Limit ..................................1                            
                  [pulls back only 1 row]
    - columns
        * Employee ID ....................... 99999
        * Employee PTO Hours ......... 240
        * Employee Login .................. intranet\jblack

    Accessing the external list within the site shows the correct information for each employee.

    Form Specs
    - I need to connect to the external list
    - And display the 1 row of data within the Form that relates to the specific employee

    Trouble-Shooting
    - I can get the fields in the form via connected web parts but that is not a good solution
    - I want the connection within the form to the external list and filtered to the Employee

    OData
    - I reviewed the lists available within the site and the External List is NOT available
          http://collaboration/sites/site-name/_vti_bin/ListData.svc/

    OWSSVR
    - I tried the owssvr option and that provided an error
         "InfoPath cannot open the XML document:" 
          http://collaboration/sites/site-name/_vti_bin/owssvr.dll?Cmd=Display&List={GUID}&View={GUID}&XMLDATA=TRUE
          "The file cannot be accessed."

    I simply want to connect to the external list, filter it by Employee Login and display the associated PTO Hours for the Employee.
    Sounds very simple but very frustrating.

    Any assistance greatly appreciated!

  • 01-11-2013 07:10 AM In reply to

    Re: Need to Consume Filtered External List Item Within InfoPath 2010 Form

    Hi - for owssvr, did you try the URL in the browser? I need to ask - did you replace the placeholder {GUID} with the actually list & view GUIDs? Sometimes people don't realize those are placeholders.... Oh, and I've found in IP 2010, you have to add &noredirect=true to owssvr data connections. Now - if you use owssvr, you'll also have to use code (or you could try qRules - it has a command for this). You know, since you were looking into OData, I'm going to guess you are using IP 2010 / ShP 2010 - since you are using just equivalency comparisons, can you just use a regular SharePoint List connection? In IP 2010 you'll have query fields available that would allow you to return filtered data....

    Hilary Stoupa

  • 01-11-2013 08:33 PM In reply to

    Re: Need to Consume Filtered External List Item Within InfoPath 2010 Form

    I attempt to configure a retrieve connection of the type 'XML Document' and supply the List & View GUIDs along with the '&nodirect' and XMLDATA parameters and retrieve an error every time. Any ideas? What addtl info do you need?
  • 01-14-2013 07:56 AM In reply to

    Re: Need to Consume Filtered External List Item Within InfoPath 2010 Form

    Does the URL you are using work in the browser? That is, if you paste the URL in your browser's address bar, do you get an XML file (or display of XML) in return?

    Hilary Stoupa

  • 01-16-2013 06:34 AM In reply to

    Re: Need to Consume Filtered External List Item Within InfoPath 2010 Form

    Results when target is an Basic List
    http://collaboration/sites/site-name/_vti_bin/owssvr.dll?Cmd=Display&List={CA6BBF86%2DC036%2D492B%2D8417%2DFEB04132A7C7}&View={AA024A94%2D2DAE%2D4DED%2DBB5C%2D0776CBD5727D}&XMLDATA=TRUE&noredirect=true
    - An XML file displays in the browser successfully

    Results when target is an External Content Type List
    http://collaboration/sites/site-name/_vti_bin/owssvr.dll?Cmd=Display&List={18D45ACB%2D2CBA%2D49B7%2D8CBC%2D01ABBBD8371A}&View={9167DA8F%2D7CEE%2D498A%2D834B%2D7D7B7D583437}&XMLDATA=TRUE&noredirect=true
    * An error dialog displays with the following contents:
      Error
      Cannot complete this action.
      Please try again.
      Troubleshoot issues with Microsoft SharePoint Foundation
      * Go back to site

  • 01-16-2013 07:54 AM In reply to

    Re: Need to Consume Filtered External List Item Within InfoPath 2010 Form

    Well. Euw. That makes it seem like owssvr.dll is not going to work w/ your external content list. However, when you connect to the list using a regular SharePoint list data connection, don't you have query fields in the data connection? I do on my ShP site w/ my test external list (see screenshot) - you could just set the query field to the value you want to filter on and execute the query, no?
    Hilary Stoupa

  • 01-16-2013 08:24 AM In reply to

    Re: Need to Consume Filtered External List Item Within InfoPath 2010 Form

    Via SPD2010, I edited the View page and set a parameter name equal to the ServerVariable(LOGON_USER)
    * this captures the employee login (eg; intranet/jblack)

    The External List View then contains a filter where the EmployeeLogin field must equal the {MyServerParam} value
    * so each employee will only see their PTO hours.

    So it should already be presenting a filtered view within the browser of the InfoPath form

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