Link to home
Start Free TrialLog in
Avatar of -Polak
-PolakFlag for United States of America

asked on

How do I Count the Number of Selections in a Multi Select List?

I'm trying to use a combination of rules, default values, and the count() function to count how many selections a user makes from a multi select list populated from a SharePoint Data Connection. I've tried to follow this thread:
http://www.infopathdev.com/forums/t/13563.aspx 

It's not working for me. I can only get the behavior to correctly count how many have been selected after one that was selected is DE-selected.

How do I accomplish this?
SOLUTION
Avatar of Clay Fox
Clay Fox
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of -Polak

ASKER

Okay, even though there are 50 possible selections in the multi-select, and a user may need up to 25, I can live with going with that solution...

So now that I have a repeating table (with 3 columns) how do I count how many selections a user makes? I realize that I can count the repeating group and only place 1 field in each group; however, with up to 25 selections being made that will make my form unnecessarily long....

I've tried (in the default value of my count field):
Count(/my:myFields/my:Capability/my:MissionPartRT/my:ReqCapMissPartners/[my:testing1 = "XYZ"]

But this only counts if the user selects XYZ in  the first column/field.... what I really need is an expression that allows me to say count testing1 <> "..." + testing2 <> "..." + testing3 <>"..."
("..." being the hypothetical default value in each of the repeating fields).
However, it appears that "<>" isn't the right expression for "does not equal".

Also/Separately, kindly see my question on promoting data from repeating groups to SharePoint... basically I'm asking if there's anyway to create unique fields on SharePoint from a repeating group or if its best to just use a delimiter and handle separating the data on the analysis side....
https://www.experts-exchange.com/questions/28625225/Repeating-Data-Multi-Choice-Lists-Repeating-Sections-and-Transmitting-to-SharePoint.html
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sure that should work.
Avatar of -Polak

ASKER

My solution is identified as the best solution as it should  should help other novice users better understand and provides a walkthrough; but, I wouldn't have gotten there without clayfox's recommendations.