Count total number of choices (not just selected ones) in a list box populated by data connection - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Count total number of choices (not just selected ones) in a list box populated by data connection

Last post 04-13-2017 11:39 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-13-2017 11:05 AM

    Count total number of choices (not just selected ones) in a list box populated by data connection

    I have a list with an InfoPath form and a document library that are connected so that the InfoPath form displays the title of all the related documents (attachments) in a list box. There are many documents to one InfoPath form/list item. What I’m trying to do is count the total number of attachments and display that number in a text field. Using the count function just returns 1, I’m assuming because only 1 item in the list is selected, but I want to get a count of the total number of “choices” in the list. Is there a way to do that? I was thinking if there’s a way to count the UNselected choices I could just add one to that. I’m open to solutions that use a better control than the list box, that’s just the only way I could get it to work where it shows the title of all of the documents linked to that item.
  • 04-13-2017 11:39 AM In reply to

    Re: Count total number of choices (not just selected ones) in a list box populated by data connection

    Sure - you need to count the rows in the secondary data source. :) So - your multi-select uses a secondary data source, right? Your expression to count all is just to use the count function on the repeating group that you use for the multi-select's options. Attach your form to a reply (under the options tab) if you need a hand.
    Hilary Stoupa

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