A SharePoint list that contains data required for this form to function correctly cannot be found InfoPath SharePoint online error

This SharePoint tutorial, we will discuss how to fixed InfoPath SharePoint online error: An error occurred querying a data source. A SharePoint list that contains data required for this form to function correctly cannot be found. Or sometimes the error also comes as: An error occurred querying a data source. You do not have permissions to access a SharePoint list that contains data required for this form to function correctly.

Let me just give a background in which scenario I received the above errors.

Recently we were replicating one SharePoint online site from another SharePoint online site. That site has one InfoPath form which is deployed to a form library. When we save the form library as a template (in the source site where the InfoPath form has been developed and deployed) and create in the destination site, the InfoPath form comes. But when we open the InfoPath form in the browser to fill and submit it gave errors like below:

An error occurred querying a data source.
Click OK to resume filling out the form. You may want to check your form data for errors.
A SharePoint list that contains data required for this form to function correctly cannot be found. The error looks like below:

A SharePoint list that contains data required for this form to function correctly cannot be found
A SharePoint list that contains data required for this form to function correctly cannot be found

Also sometimes it shows error like below:

An error occurred querying a data source.
Click OK to resume filling out the form. You may want to check your form data for errors.
You do not have permissions to access a SharePoint list that contains data required for this form to function correctly.

You do not have permissions to access a SharePoint list that contains data required for this form to function correctly
You do not have permissions to access a SharePoint list that contains data required for this form to function correctly

The error was coming at the destination site only.

A SharePoint list that contains data required for this form to function correctly cannot be found InfoPath SharePoint

The InfoPath form has few data connections which were used to retrieve data from a few lists and bind to drop-down list inside the form. To resolve the issue I just redeploy the InfoPath form by modifying the data connection without changing anything.

Just click on the Data Tab -> Data Connections.

An error occurred querying a data source InfoPath
An error occurred querying a data source InfoPath

This will open the Data Connections dialog box which will show all your data connections. Here select the particular data connection from the list of data connections and click on Modify… to modify the data connection without changing anything (Just click on Next -> Next -> Next and Finish).

Now redeploy the InfoPath form to the destination site collection. Next time when you will open the InfoPath form to submit data, you will not get any warning messages.

You may like following InfoPath SharePoint tutorials:

I hope this will be helpful to solve the issue A SharePoint list that contains data required for this form to function correctly cannot be found InfoPath SharePoint.

  • Thank you , I have the same error for sharepoint 2010 / infopath –
    An error occurred querying a data source.

    An entry has been added to the Windows event log of the server.
    Log ID:7893
    Can you help please?

  • >