none
query data is very slow RRS feed

  • Question

  • i have two list 'Контни план' -2000items and 'Неправилност-налаз', the list 'Неправилност-налаз' gets items from the list 'Контни план' using infopath 2010 over data connection. the data connection use  four fields from 'Контни план'. the fields are: 'Број конта','Назив конта', 'Рачуноводствена основа' and 'Ревизијска област'. the data connectison is very slow and i create query data, but my query data is very slow again. i made somewhere error. the pictures display my phases creating query data. i created arule on combobox field 'Ревизоркса област' like picture below

    and query data connection.

    then i set filter on dropdown field 'Број конта' like on pictures below

    where i made mistake? my query data also is very slow.

    • Edited by gogi1000 Monday, July 8, 2019 9:15 AM edit
    Monday, July 8, 2019 9:12 AM

All replies

  • Hi,

    Please try to do as follows.

    1. When you connect to the external data source (any business object), try to de-select the option of loading the data on form load. InfoPath parses the data via XML and try to load all the data from the external data connection on form load and hence it will be very slow.

    2. Try to get list items using REST Web Service(listdata.svc), and use $filter to filter the items.

    3. Try to sort and filter the default list view.

    More information for your reference:

    http://blog-sharepoint.blogspot.com/2009/08/infopath-performance-for-sharepoint.html

    https://social.msdn.microsoft.com/Forums/office/en-US/1431caff-bfe6-468d-9d9c-c2b3329c0209/infopath-form-loading-very-slow?forum=sharepointcustomizationprevious

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, July 9, 2019 2:15 AM
    Moderator
  • on my data connection i de-selected the option of loading the data on form load. i tryed with REST Web service, but $filter is not working, i created rule with next code

    concat("http://test-net.dri.local/_vti_bin/listdata.svc/КонтниПлан?$filter=РачуноводственаОснова eq '", Рачуноводствена основа,"'")

    when i set $filter i receive error

    The query cannot be run for the following DataObject: REST Web Service
    InfoPath cannot run the specified query.
    The file is not a valid XML file.
    Not enough storage is available to process this command.

    Tuesday, July 9, 2019 5:55 AM
  • Hi,

    Did you try to sort and filter the default list view?

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, July 9, 2019 9:25 AM
    Moderator
  • yes, i tryed with $filter, $select in REST web service, but everytime same error.
    Tuesday, July 9, 2019 9:35 AM
  • Hi,

    I mean, you can sort and filter the list view from the UI, then select the "SharePoint library or list" when select the source of your data in data connections.

    Or we can use achieve your requirement using jQuery with REST API in list form.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, July 9, 2019 9:45 AM
    Moderator
  • ok, but i don't know how use filtered view in REST Web service? can you give me some guide? Also, if ii'm filtering default view i dont receive all items that i need them
    • Edited by gogi1000 Tuesday, July 9, 2019 10:40 AM edit
    Tuesday, July 9, 2019 10:27 AM
  • Hi,

    About the ListData.svc filter, please refer to the article below.

    http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/01/21/introduction-to-querying-lists-with-rest-and-listdata-svc-in-sharepoint-2010.aspx

    Base on your requirement, we can use JavaScript to instead of the InfoPath rule to achieve it.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, July 10, 2019 2:07 AM
    Moderator
  • i used your link but nothing, how i use Java Script or something else?
    Wednesday, July 10, 2019 7:01 AM
  • Hi,

    The following example code for your reference, please modify it to meet your requirement.

    <script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    	getListUsingSPSerivces();
    });
    function getListUsingSPSerivces(){
    	var siteUrl="http://sp2010";
    	var listName="ListName";
    	var readFields="Field1,Field2,Field3,Field4";
    	var filterValue="test";
    	var filter="Field1 eq '"+filterValue+"'";
    	
    	var requestUri =siteUrl+"/_vti_bin/listdata.svc/"+listName+"?$select="+readFields+"&$filter="+filter;
    	$.ajax({
    		url: requestUri,
    		method: "GET",
    		async:false,
    		headers: { "Accept": "application/json; odata=verbose" },
    		success: function (data) {
    			var items=data.d.results;
    			$.each(items,function(i,item){
    				//build the data into the dropdown list.
    			});
    		},
    		error: function (err) {
    			console.log(JSON.stringify(err));
    		}
    	});
    };
    </script>

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, July 10, 2019 7:55 AM
    Moderator
  • above code i set in some web part?
    Monday, July 15, 2019 11:41 AM
  • Hi,

    Add the code into content editor web part in list form.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, July 16, 2019 3:09 AM
    Moderator