Question

rnmartin on Thu, 13 Apr 2017 14:14:19


I have a list with an InfoPath form and a document library that are connected so that the InfoPath form displays all of 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 on the InfoPath form. 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 use 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.


Sponsored



Replies

croute1 on Thu, 13 Apr 2017 17:32:34


Hi rnmartin- interesting concept. Hmmm... how are you "connecting" the related docs? IE: if you have a "category" or other type of column it's based on, you could probably filter the list and get a count that way. Not sure without knowing how you have it set up, but the double lookup trick may come in handy for you:

http://pawansatope.blogspot.com/2012/01/how-to-create-count-related-lookup.html