Problems with Sorting Data Connection - SharePoint Online - InfoPath - InfoPath Dev
in

InfoPath Dev

Problems with Sorting Data Connection - SharePoint Online - InfoPath

Last post 06-19-2015 08:21 AM by chasquad. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-19-2015 08:21 AM

    Problems with Sorting Data Connection - SharePoint Online - InfoPath

    Hi

    I have an InfoPath form in SharePoint Online. 

    On Form Load I have the Status field of the query of the secondary data connection being set to "approved" so that I only bring in approved posts.  Then I have the secondary data connection being queried.  The secondary data connection is set up to sort in descending order on the Announcement Start Date field.

    Then on the repeating table properties, I have added this formatting rule to limit the number of rows to 6:

    count(preceding-sibling::d:SharePointListItem_RW) + 1 <= count(/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW) - 6

    AND

    count(/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW) > 6

     

    The issue is that when I limit the number of rows to 6, the 6 rows that come in are all "approved" but the sort by Announcement Start Date is no longer being honored.  Meaning that I'm not getting the 6 rows that I'm expecting.  Is there another way to do the sort?

    I tried a different method for the data connection by telling InfoPath to use a specific SharePoint Online list view for the data.  On that view I did my sorting and filtering.  This worked in the PREVIEW of the form in the InfoPath client, but does not work right in the browser because there is an error when the form is attempting to load on the SharePoint Online page:

    "An error occurred querying a data source. XML data that is required for this form to function correctly cannot be found."

    And I can't store the XML data in the form because then the list would be out of date.  I need the form to query the SharePoint list every time the form is opened on the SharePoint Online Web page.

    Any help would be appreciated!  Thanks!

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