Is it possible to filter or limit the number of results in Infopath that are pulled through from a Sharepoint 2013 site ? - InfoPath Dev
in

InfoPath Dev

Is it possible to filter or limit the number of results in Infopath that are pulled through from a Sharepoint 2013 site ?

Last post 06-29-2017 08:36 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-29-2017 07:21 AM

    Is it possible to filter or limit the number of results in Infopath that are pulled through from a Sharepoint 2013 site ?

     Hello again

    I'm working with data that is on a SharePoint 2013 list - the data is pulling through OK to the InfoPath form as a repeating table (sorted by ID).

    However  - I want to limit the number of items that show on the InfoPath form .   EG   there may be 10 items on the SharePoint site - BUT we only want to see the latest 3 on the InfoPath form.    (the reason for this is that the InfoPath form is being used as a Project Status Report and we don't want to see ALL the items each month on the InfoPath form - just some.)

    Can this be done ?   if so - how ??  will it need any coding etc ?   

    Any help would be most appreciated.

    Thanks

    Peter 

  • 06-29-2017 08:36 AM In reply to

    Re: Is it possible to filter or limit the number of results in Infopath that are pulled through from a Sharepoint 2013 site ?

     Yes, you probably would want to change your sort to sort by date modified. Then you can use conditional formatting to hide all but the first three rows. The formatting condition goes on the repeating row or section, and will be something like this (right click the repeating SharePointListItem data node in the fields task pane and select "copy XPath" to ensure you have the right namespace prefix and node name - yours may not be the same as mine):

    count(preceding-sibling::d:SharePointListItem_RW) > 2 

    Count of preceding sibling returns 0 for the first row, one for the second, two for the third - so the above formula should hide all but the first three rows. Make sense? 

    Hilary Stoupa

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