Adding SharePoint List data Source - InfoPath Dev
in

InfoPath Dev

Adding SharePoint List data Source

Last post 07-16-2012 05:10 PM by tenbao. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 06-11-2012 05:44 PM

    Adding SharePoint List data Source

    I created a form that maps its fields to a DB. I save it and publish it to SharePoint using DAT. It opens fine. But when I update the XSN template with a SharePoint List data source and save it using the DAT. I get an error. In the InfoPath Client I get an the below error. Thank you in advance for your help.

     "The form cannot be opened because some external data cannot be retrieved.

    InfoPath cannot open a new form.
    The form cannot be opened. To fix this problem, contact the form designer.
    Form template: http://qdabradbxldev/QdabraWebService/Forms/ID/291/template.xsn
    The query cannot be run for the following DataObject: TCW Funds
    InfoPath cannot run the specified query.
    The parameter is incorrect.

    I also get the below error in the SharePoint logs.

     06/11/2012 17:19:31.79  w3wp.exe (0x0C14)                        0x08E4 InfoPath Forms Services        Runtime                        8gec Exception Unhandled exception when rendering form System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.UrlIsSameFileOrSamePath(String absoluteFileUrl, String baseFileOrFolderUrl)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.IsSolutionMoved(Document document)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.GetList(WebHolder webHolder, Boolean impersonatedIdentity, Document document, String siteUrl, Boolean isUrlSetThroughOM, Guid listId)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.<>c__DisplayClasse.<Execute>b__3(Boolean impersonatedIdentity)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterUtil.Impersonate(DataAdapterInformation adapterInfo, String userName, String userDomain, String password, CodeToRunUnderImpersonation codeToRun)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterUtil.Impersonate(DataAdapterInformation adapterInfo, String userName, String password, CodeToRunUnderImpersonation codeToRun)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.Execute(String siteUrl, Guid listId, SPContentTypeId contentTypeId, Document document, DataAdapterListDataProvider documentAdapter, Boolean useDcl, XPathNavigator queryFields, XPathNavigator resultFields, Boolean isListItemEditing, Boolean discoveryOnly, Int64& auxDomSize)     at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapterListDataProvider.ExecuteInternal(XPathNavigator queryFields, XPathNavigator resultFields, Boolean useListItemMode)     at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.QueryDataOnLoad(DataAdapter documentDataAdapter, DataObject documentDataObject)     at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.ExecuteInitOnLoadForDataObjects()     at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.LoadSolutionAndDocument(HttpContext context, Solution solution, DocumentMetaInformation documentMetaInformation, OnInitializeCallback onInitializeCallback, OpenParameters openParameters)     at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.OpenDocumentWithSolution(HttpContext context, SPSite contextSite, Solution solution, DocumentMetaInformation documentMetaInformation, OnInitializeCallback onInitializeCallback, OpenParameters openParameters)     at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.DataBindInternal(SolutionMetaInformation solutionMetaInformation, DocumentMetaInformation documentMetaInformation, String absoluteSolutionLocation, Boolean hasCloseHandler, Document& document)     at Microsoft.Office.InfoPath.Server.Controls.FormServerPage.InitializeRenderInLine(SolutionMetaInformation solutionMetaInformation, DocumentMetaInformation documentMetaInformation, String absoluteSolutionLocation)     at Microsoft.Office.InfoPath.Server.Controls.FormServerPage.NewEditingSession(SPSite contextSite, FormServerPageQueryParameters queryParameters, Boolean isFormServerProperlyConfigured, Boolean& renderSessionsStateError)     at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.StartNewEditingSession()     at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.EnsureDocument(EventLogStart eventLogStart)     at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.<>c__DisplayClass8.<LoadDocumentAndPlayEventLog>b__5()     at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) f1b370ee-3cc8-456c-ac90-b67a9725e770

  • 06-12-2012 05:54 AM In reply to

    Re: Adding SharePoint List data Source

    Hi,

    This is a known issue in DBXL v2.4 and newer, and we're hoping to find a fix for this in an upcoming version.

    For now, the workaround is documented in the DBXL release notes. Here it is:

    An InfoPath 2010 browser-enabled form with an on-load data connection that retrieves data from a SharePoint 2010 library or list may present an error when using DBXL v2.4 (or newer). This is because InfoPath 2010 uses relative paths for this data connection. The workaround is to:
    1. publish the XSN template directly from InfoPath to SharePoint,
    2. download the template from SharePoint,
    3. attach the downloaded XSN to DBXL,
    4. and then add the SharePoint mapping, checking “Publish XSN” and “Use Forms Services”.
    By publishing the form directly from InfoPath to SharePoint, the data connections get fixed up and can then be used without issue in DBXL.

    Let us know whether this works for you. Thanks.

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


  • 07-11-2012 06:06 PM In reply to

    Re: Adding SharePoint List data Source

    Thanks this fix worked. But now I noticed that when fields are promoted in InfoPath, they are first created when published from SharePoint. Then a duplicate set of fields are created in the InfoPath Library when the form is published again from Qdabra. How do I prevent this?

  • 07-12-2012 05:43 AM In reply to

    Re: Adding SharePoint List data Source

    Hi-

    What version of DBXL are you using? You can check this in the footer of the DBXL Admin Tool.

    Thanks.

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


  • 07-12-2012 11:00 AM In reply to

    Re: Adding SharePoint List data Source

    DBXL Version: 2.6.2012.324

    Form Version: 2.6.0.153

  • 07-13-2012 09:10 AM In reply to

    Re: Adding SharePoint List data Source

    Have you had a chance to take a look at this?

  • 07-13-2012 11:39 AM In reply to

    Re: Adding SharePoint List data Source

    Hi-

    Sorry for the delay.

    I investigated your scenario using the latest DBXL v2.6 and one of our SharePoint 2010 servers.

    It's very interesting and I have opened a case so we can investigate further for DBXL v2.7. I see two options:

    1. Instead of using an OOB connection to a SharePoint list, you could use the QuerySharePoint web service included in DBXL.

    2. If you want to keep the default data connection to the SharePoint list, then:

    (a) Add a secondary data connection to an XML file that contains the name of the Document Type:

    <FormOptions>
    <docTypeName>ForumTest</docTypeName>
    </FormOptions>

    (b) Update your DBXL Submit data connection such that the doctyname parameter is declared (screenshot attached)

    (c) As explained already in this discussion thread, publish the form from InfoPath to SharePoint, download the XSN and then attach it to the DBXL Admin Tool.

    (d) uncheck Publish Library and XSN in the DAT.

    Can you give that a try and let us know whether is solves the issue? Thanks!


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


  • 07-16-2012 05:10 PM In reply to

    Re: Adding SharePoint List data Source

    I would like to mark this thread as closed since my original data source question was answered. I'll create a separate thread about duplicate promoted fields.

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