Limiting number of elements displayed in a seconday data connection - InfoPath Dev
in

InfoPath Dev

Limiting number of elements displayed in a seconday data connection

Last post 08-16-2016 08:31 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-16-2016 12:43 AM

    • blkjck
    • Not Ranked
    • Joined on 08-12-2016
    • Posts 2

    Limiting number of elements displayed in a seconday data connection

    Hi guys, I'm working with library forms. Can I restrict a secondary data connection element to show me only the top 10 value based on some attribute? In my case, I'm accessing a library containing student details via a secondary data connection. I need to list, for e.g using a repeating table, the details of only the top 10 students based on their total scores.
  • 08-16-2016 08:06 AM In reply to

    Re: Limiting number of elements displayed in a seconday data connection

    Sure - you can use conditional formatting for this. Is the total scores info in the secondary data connection, so you can sort by this when the data is returned to the form? If so, you can just use a count of the preceding sibling to hide rows after the first ten.
    Hilary Stoupa

  • 08-16-2016 08:20 AM In reply to

    • blkjck
    • Not Ranked
    • Joined on 08-12-2016
    • Posts 2

    Re: Limiting number of elements displayed in a seconday data connection

    Hi Hilary, first of all, thanks for the reply :) The total scores is avaiable in the secondary DC. Currently I have applied descenceding sort on the "total scores" column/field in the 2°DC. I've tried using preceding-sibling in a previous instance. That seems to make the form unusable in a browser. With the preceding-sibling formula, I could only use the form in Filler. Wouldn't this problem persist in your suggestion?
  • 08-16-2016 08:31 AM In reply to

    Re: Limiting number of elements displayed in a seconday data connection

    Something else in your form must have caused the issue - I use preceding-sibling in conditional formatting all the time in browser forms. What is the XPath expression you are trying in your condition? I'd expect, on the repeating table or section (if this is a SharePoint list connection - your relative XPath may be different) something like hide the row if: count(preceding-sibling::d:SharePointListItem_RW) > 9
    Hilary Stoupa

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